Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Report Design
Message Icon Topic: Null values Post Reply Post New Topic
<< Prev Page  of 3 Next >>
Author Message
zanoknee
Newbie
Newbie


Joined: 10 Jan 2012
Online Status: Offline
Posts: 14
Quote zanoknee Replybullet Posted: 10 Jan 2012 at 11:35am
It seems like the big issue is the {@Fill Date} in minimum({?Date Range}) to Maximum({?Date Range})

this is the one that wipes the data


Edited by zanoknee - 10 Jan 2012 at 11:37am
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 10 Jan 2012 at 11:37am
what is the FIll Date formula?
 
What is the set up for the ?Date Range parameter?
IP IP Logged
zanoknee
Newbie
Newbie


Joined: 10 Jan 2012
Online Status: Offline
Posts: 14
Quote zanoknee Replybullet Posted: 10 Jan 2012 at 1:05pm
Fill Date Formula:

NumberVar fldYear; // ^^--Replace me!
NumberVar fldMonth;
NumberVar fldDay;
NumberVar fldDate := {TRANS.DATEFLD};
// Break down the date into logical parts
fldYear := (
If fldDate >999999 Then
Truncate(fldDate / 10000)
Else
1900 + Truncate(fldDate / 10000)
);
fldMonth := Truncate(Remainder(fldDate, 10000) / 100);
fldDay := Remainder(fldDate, 100);
// Make into Date type
If (fldMonth In 1 To 12) And (fldDay In 1 to 31) Then
Date(fldYear, fldMonth, fldDay)
Else
Date(0,0,0)

The report does have a date range parameter


IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Jan 2012 at 3:54am
to continue debugging
The formula looks valid but i do not know the data that it is altering. It appears your 'date' is stored as a numeric value.
1. if you place both the Fill Date formula and the trans.datefld on the detail section next to each other does the formula actually give you the date you expect to see from the original field?
2. Create a formula Minimum({?date range}) and place it in the report header to make sure the the value from the param is coming as expected.
3. Create a formula Maximum({?date range}) and place it in the report header to make sure the the value from the param is coming as expected.
4. Create another formual field {@Fill Date} in minimum({?Date Range}) to Maximum({?Date Range})  and place it in the detail section. It should return TRUE and FALSE depedning on if the row is int he date range or not.
Which one of these, if any, are not acting as expected?
IP IP Logged
zanoknee
Newbie
Newbie


Joined: 10 Jan 2012
Online Status: Offline
Posts: 14
Quote zanoknee Replybullet Posted: 11 Jan 2012 at 5:09am
None are returning the expected results

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Jan 2012 at 5:13am
what is some numeric date value sample data?

Edited by DBlank - 11 Jan 2012 at 5:13am
IP IP Logged
zanoknee
Newbie
Newbie


Joined: 10 Jan 2012
Online Status: Offline
Posts: 14
Quote zanoknee Replybullet Posted: 11 Jan 2012 at 6:30am
01-04-2012 the report is ran daily 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Jan 2012 at 6:40am

Sorry I am confused.

01-04-2012 appears to be either a date field or a text field but not numeric. The Fill Date inicdates it as numeric?
 
Shouldn't the raw data from the {TRANS.DATEFLD} field look like the below?
 
19990115
20110401
20101204
 
If you place the {TRANS.DATEFLD} and the FIll date side by side it should be something like this...
 
19990115    1/15/1999
20110401    4/1/2011
20101204    12/4/2010
 
What are you getting?
 
 
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 11 Jan 2012 at 6:43am
also whan you say it is run daily, that indicates to me that there may be a predefined date range that it is running for. Is that true and if so what are the rules for that? For example; always this weeks data, or month to dat, or last 24 3 days, etc.
IP IP Logged
zanoknee
Newbie
Newbie


Joined: 10 Jan 2012
Online Status: Offline
Posts: 14
Quote zanoknee Replybullet Posted: 11 Jan 2012 at 7:33am
i am getting date values rturned but they are not the right dates if I set my parameters as 9-24-2011 through 9-26-2011 I am still getting data for other dates such as 12-01-2011. When I say that it runs daily I mean someone goes in and enters the parameters daily.

IP IP Logged
<< Prev Page  of 3 Next >>
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.