Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: group issue Post Reply Post New Topic
<< Prev  Page  of 2
Author Message
johnwsun
Senior Member
Senior Member


Joined: 28 May 2008
Location: Australia
Online Status: Offline
Posts: 179
Quote johnwsun Replybullet Posted: 28 May 2009 at 12:22am
Hi DBlank,
 
Excellent! Thanks. I need to calcuate the grand total in this report. What do you mean by set to NEVER?  Could you explain it please.
 
By the way when I was caculating subtotal by using a formula @subtotal_for_order (put in group footer):
"No. of orders for " + GroupName ({MAIN_FUND.XCODE}) + " : " +  totext(Count ({LIX.ID}, {MAIN_FUND.XCODE}))
 
It gives me:
No. of orders for 0809_DM_RIC : 11.00
 
I don't know how to remove the decimal. I tried to use Val() was not successful. Could you give me some hint?
 
John
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 28 May 2009 at 7:33am
To trim the Decimals off when using totext you add a ,0 after the number field so it would be:
"No. of orders for " + GroupName ({MAIN_FUND.XCODE}) + " : " +  totext(Count ({LIX.ID}, {MAIN_FUND.XCODE}),0)
 
The "Never" option was in reference to a Running Total (rather than the formula variable field). When creating a Running Total the last item you identify is when to reset the the number back to 0 (the same process as your variable @reset_subtotal is needed to reset your varibale back to 0).
If in a Running Total you indicate it as reset as Never you will get a grand total for the entire report (assuming you place this RT field in the report footer Wink ).
It is not needed if you use a variable process instead of a RT. However you would need a new variable for your total sum that you are not resetting at each group level 2.
Let me know if you need any more help.
IP IP Logged
johnwsun
Senior Member
Senior Member


Joined: 28 May 2008
Location: Australia
Online Status: Offline
Posts: 179
Quote johnwsun Replybullet Posted: 28 May 2009 at 7:42am
That's great! DBlank, I didn't realize the totext can take arguments for things other than date--"dd MM YYYY".
 
I will try using RT as you advised, and let you know tomorrow because it's too late now.
 
J
IP IP Logged
<< Prev  Page  of 2
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