Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal XII - Formula issue Post Reply Post New Topic
Author Message
mullergj1970
Newbie
Newbie


Joined: 26 Sep 2011
Location: South Africa
Online Status: Offline
Posts: 5
Quote mullergj1970 Replybullet Topic: Crystal XII - Formula issue
    Posted: 26 Sep 2011 at 11:50pm
Good day ...
 
I have a formula working out datediff on two date fields , this is placed in the details section of the report,
My problem is when generating the report, the datediff formula works on most records but I have at least 3% of the records where the datediff calculation is just blank , no data shown.
I have confirmed that the database tables are populated with the necessary info.
Why would the formula show data only for some records when all are populated
 
need assistance with this as this seriously affects the report totals / averages etc.
Just another report designer
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Sep 2011 at 3:36am
this usually indicates a NULL in one of the 2 fields being calculated.
I would place the 2 fields in the report and verify for these rows do not have nulls or write an if into your fomrula to give you back some value on a null.
IP IP Logged
mullergj1970
Newbie
Newbie


Joined: 26 Sep 2011
Location: South Africa
Online Status: Offline
Posts: 5
Quote mullergj1970 Replybullet Posted: 27 Sep 2011 at 3:48am
Hi ...thanks for the response ,
I have double checked and all date fields do contain valid data for the period requested , my first thought was an incomplete field / null data.
but this is definately not the case , it just stops displaying data after the 4th page of the report.
 
one issue is the date fields in the database were set as string fields ( old legacy system) I use a cdate function to first convert the date to a valid date field the do the date diff function.
Second to this if I look at the detail section the dates show as blank fields , as mentioned after about the 4th page hence the datediff fields are blank. I am not aware of any restrictions on number of records crystal can process.
My dilema persists :(
Just another report designer
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 27 Sep 2011 at 4:09am

likely it is failing on the date conversion

try using an isdate() formula to test each field to make sure it is a valid date. Yo9u can use it on your fomrula as well. It will return a TRUE if it is valid and FALSE if it is not valid
 
IP IP Logged
mullergj1970
Newbie
Newbie


Joined: 26 Sep 2011
Location: South Africa
Online Status: Offline
Posts: 5
Quote mullergj1970 Replybullet Posted: 27 Sep 2011 at 7:32pm
Cool ....thanks , I will try this and post again if I find any issues.
Just another report designer
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.016 seconds.