Report Design
 Crystal Reports Forum : Crystal Reports .NET 2003 : Report Design
Message Icon Topic: Minimum Date not returning correct data Post Reply Post New Topic
Author Message
chudok
Groupie
Groupie


Joined: 18 May 2010
Online Status: Offline
Posts: 70
Quote chudok Replybullet Topic: Minimum Date not returning correct data
    Posted: 14 Mar 2013 at 5:48am
I am trying to use the minimum date for a report. Basically I have orders that come in and I need to only see the first receive date of these orders. I can get this. But the issue is when I look at the qty received it is not pulling the right amount. It pulls it from another date. I have tried to group on minimum date but it is not working.   Sample data - Order 105 - ordered 100 - first receive date 2/5/12 - receive 5, next receive date 2/10/12 and receive 80. The 80 is showing up in my line. I am not using the detail section - I've tried that and no luck either.

IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3701
Quote hilfy Replybullet Posted: 15 Apr 2013 at 8:01am
How are you getting the data for your report - tables linked in Crystal, a command, a stored procedure, or a universe?  How are your SQL skills?
 
A command is just a SQL Select statement that pulls all of the data for the report.  I can think of a way to do this using a command if you think you're up to writing one.
 
-Dell
IP IP Logged
joeg1962
Newbie
Newbie


Joined: 01 Mar 2013
Location: United States
Online Status: Offline
Posts: 35
Quote joeg1962 Replybullet Posted: 16 Apr 2013 at 4:15am
I have done the following to link a date with a result.

(year({@BMI_obsdate})*10000) + (month({@BMI_obsdate})*100) + (day({@BMI_obsdate})) + ({@BMI_obsvalue}/1000)

Which creates an entry like 20130214.024 for Feb 14, 2013 and BMI of 24. Thus, assuming only one entry in a day, I can grab for max or min of this field and then pull it back apart with before the decimal being the date and after the date being the result.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.