Print Page | Close Window

Minimum Date not returning correct data

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19269
Printed Date: 18 May 2024 at 6:12am


Topic: Minimum Date not returning correct data
Posted By: chudok
Subject: Minimum Date not returning correct data
Date 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.




Replies:
Posted By: hilfy
Date 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


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: joeg1962
Date 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.



Print Page | Close Window