Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: CrossTab Help Post Reply Post New Topic
Author Message
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Topic: CrossTab Help
     Posted: 27 Mar 2013 at 9:47am
I have a report with a crosstab placed in the report footer to generate totals based on a certain sequence. The report is not grouped by this sequence and cannot be. The information that appears in the crosstab is the exact information that I need.

The problem is I need to be able to use the totals of the fields by sequence in Group Footers.

Is there any way to use information generated in a "grand total" crosstab elsewhere within a report?
|< /\ '][' ( )
IP IP Logged
Sastry
Moderator
Moderator
Avatar

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

We can't use cross tab information else where in the report.

If you want to insert grand totals for a particular field try to use sum() i.e. sum({vlaue})



Thanks,
Sastry
IP IP Logged
FrnhtGLI
Senior Member
Senior Member
Avatar

Joined: 22 May 2009
Online Status: Offline
Posts: 347
Quote FrnhtGLI Replybullet Posted: 29 Mar 2013 at 2:44am
Thanks for your reply, unfortunately, that method doesn't work for my needs. I tried doing a sum of the field based on the group (sum({field}, group)) but it would not let me use the group for whatever reason.

So what I ended up having to do was create a subreport located in the report header that gets run only ones. The subreport uses a shared number variable to calculate the totals, then a shared string variable to store all the information in a single string so I can pass the entire string to the main report. I delimited the totals with '/' before each groups totals to allow for easily distinguishing each set of totals.

In the main report I grab the necessary information out of the string by locating the group key in the string and gather the totals information. I was then able to use those totals where necessary in my report. It was an around-the-world way of doing things, but works fine without slowing down the report.
|< /\ '][' ( )
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