Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Group Running Totals Post Reply Post New Topic
Author Message
aeckaren
Newbie
Newbie
Avatar

Joined: 24 Jul 2012
Online Status: Offline
Posts: 26
Quote aeckaren Replybullet Topic: Group Running Totals
    Posted: 25 Jul 2012 at 4:31am
Hi All -

I'm new here and have learned so much by searching the forums! I can't find the exact answer to a question and hope you can help...

I have a report that summarizes sales by salesman (each salesman being a group). The top level is a list of customers by salesman with running totals for each customer. You can drill down on each customer and see actual invoice details. There are some duplicated invoice lines that are hidden and not included in the running totals.

I would like to put a summary field on the top level that gives the salesman a grand total for all of their customers. It seems really simple, but I don't know what I'm missing here. I can do an actual summary line of the field OEP70.LVAL70 and place it on the top level, but that adds in the duplicated invoices which I'm trying to avoid.

Any ideas?

Thank you,

Karen
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Jul 2012 at 4:06am
RTs (or shared variable formulas) do not work in headers as they are calcuated in a pass that occurs to late int he report generation.
sometimes you can use RTs in a crosstab in a header. Crosstabs are created in a later pass.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 26 Jul 2012 at 4:13am
Another option would be to create a formula that uses the logic from the "Evaluate" section of your running total.  It would look something like this:
 
if <logic from Evaluate> then {OEP70.LVAL70} else 0
 
Then create a sum of this formula and put it in the group header.
 
-Dell
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 26 Jul 2012 at 4:21am

I would respectively disagree with Dell only in that I think you would have to use a previous() or next() function in the if-then formula due to your suppressed duplicate rows. This would would prevent the formula from being able to be summed and then used in a header. If you can avoid using the previous/next options and get your values as need in an if-then statement then Dell's solution would be optimal.



Edited by DBlank - 26 Jul 2012 at 4:21am
IP IP Logged
aeckaren
Newbie
Newbie
Avatar

Joined: 24 Jul 2012
Online Status: Offline
Posts: 26
Quote aeckaren Replybullet Posted: 26 Jul 2012 at 4:43am
You both have given me some good ideas. I'll let you know how it works out. Thanks.
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 26 Jul 2012 at 4:44am
Thanks DBlank - I have a tendency to forget about the incompatibility between previous()/next() and summary functions.
 
-Dell
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.