Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: A date is required here. Post Reply Post New Topic
Author Message
dkalsow
Groupie
Groupie
Avatar

Joined: 10 Jan 2011
Location: United States
Online Status: Offline
Posts: 65
Quote dkalsow Replybullet Topic: A date is required here.
    Posted: 02 Feb 2011 at 10:03am
I have the following formula:
 
currencyVar CumulativeSales;
if {Po_noteExtensionBase.Po_EffectiveDate} >= DateTime({?BeginingDataRange}) then
(
if {Po_noteExtensionBase.Po_EffectiveDate} <= {?EndingDateRange} then
(
if isnull({Po_noteExtensionBase.Po_RenewalNote}) then (
CumulativeSales := {Po_noteExtensionBase.Po_NoteValue};
)));
CumulativeSales
 
When I try to save it I get the error of 'A date is required here' and it highlights the {?BeginingDataRange} field.  This field is a date/time field which is being fulled by the user when the report starts.
 
What am I missing?
 
Thanks!
Thanks :)
dkalsow
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 02 Feb 2011 at 11:00am
I don't see why you need a variable here - it doesn't look like you're adding to the variable, just changing it for every record that meets the criteria.  Instead, try something like this:
 
if {Po_noteExtensionBase.Po_EffectiveDate} in {?BeginingDataRange} to {?EndingDataRange}
then {Po_noteExtensionBase.Po_NoteValue}
 
This is assuming that your two parameters are both set up as dates.
 
-Dell


Edited by hilfy - 02 Feb 2011 at 11:00am
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.