Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: What is wrong with my formula Post Reply Post New Topic
Author Message
Tycanis
Newbie
Newbie


Joined: 18 Jul 2011
Location: United States
Online Status: Offline
Posts: 11
Quote Tycanis Replybullet Topic: What is wrong with my formula
     Posted: 08 Mar 2013 at 11:07am
I am trying to create a formula that will look at a parameter DateTime and determine if it is greater than the DateTime in a field.  If it is greater then the result is the parameter time, if not the result is the field time.  This is what I have
 
timeVar x := (Time({Command.SCAN_CREATE_TM}));
timeVar xx;
IIF (x>Time({?End Time}),xx:=Time({?End Time}),xx:=x)
 
The result ends up being everything becomes the parameter time.  What is wrong?  Thanks.
IP IP Logged
Sastry
Moderator
Moderator
Avatar

Joined: 16 Jul 2012
Online Status: Offline
Posts: 537
Quote Sastry Replybullet Posted: 11 Mar 2013 at 1:32am
Hi

There is no problem with your formula, the condition is true then it returns parameter time else it will assign field time to xx variable.

Do the following to find the problem with your time stamps :

in Detail, drag Command.SCAN_CREATE_TM filed and ?End Time parameter and see what is wrong with your time stamps.

Thanks,
Sastry
IP IP Logged
Tycanis
Newbie
Newbie


Joined: 18 Jul 2011
Location: United States
Online Status: Offline
Posts: 11
Quote Tycanis Replybullet Posted: 14 Mar 2013 at 7:48am
Thanks for the tip.  That is what I needed to do.
IP IP Logged
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