Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Manual Max Value of a Number Field Post Reply Post New Topic
Author Message
stewary
Newbie
Newbie


Joined: 18 Dec 2009
Online Status: Offline
Posts: 13
Quote stewary Replybullet Topic: Manual Max Value of a Number Field
     Posted: 31 Dec 2009 at 7:41am
Hello,
 
I need to find the max value of a number type field manually.  My field was created using the 'previous' command that does not allow any summarizing.
 
Thanks much.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 04 Jan 2010 at 7:04am
Create another formula using a variable.  It would look something like this:
 
NumberVar maxval;
If PreviousIsNull({field your calculation uses)) or ({@MyCalculatedNumber} > maxval) then maxval := {@MyCalculatedNumber};
maxval
 
Note that in order to get the value to appear on the report when you need it. you need to put the variable at the end of the formula WITHOUT the semicolon at the end.
 
-Dell
IP IP Logged
stewary
Newbie
Newbie


Joined: 18 Dec 2009
Online Status: Offline
Posts: 13
Quote stewary Replybullet Posted: 05 Jan 2010 at 7:44am
Worked!  Thanks much.
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