Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grand total in Crystal Report 4.6

Status
Not open for further replies.

theamis

MIS
Joined
Jul 9, 2002
Messages
15
Location
PH
Hi!

I'm having problem with the grand total in crystal report 4.6. My problem lies in the grand total of a specific date range. It suppose to show the grand total of the said date range example between May to June and not the whole year. What am I suppose to do to see the total only of that range?

Thank you very much for the help.
 
If your date range isn't included in your selection criteria, you can create formulas for this. Namely;

whileprintingrecords;
numbervar total;

If {date} in [date(<yourdate1>) to date({yourdate2})]
then total := total + {whatever}
else total;

Then call the variable where you want the total to show up.

Naith
 
Naith,

Thanks. I'll try it right away.
 
Hi!
I tried the code but it generate an error:
&quot;A number is required here&quot;
which points to the total variable.

How can I solve this problem?
I really appreciate the help. Thanks.
 
Naith's formula

whileprintingrecords;
numbervar total;

If {date} in [date(<yourdate1>) to date({yourdate2})]
then total := total + {whatever}
else total;

is not legal in Crystal 4.6 since there was no &quot;in&quot; allowed

try this instead

whileprintingrecords;
numbervar total;

If {date} >= date(<yourdate1>) and
{date} <= date({yourdate2}) then
total := total + {whatever}
else
total; Jim Broadbent
 
Thanks Jim!

I'm going to apply it at once.

Again, thank you very much.
 
Thank you very much to all those who help me with this problem. It is finally solved.

Again, my deepest gratitude.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top