Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Crystal Reports - Sharing/passing cross tab results accross subreprpots

Posted on 2011-04-26
4
Medium Priority
?
623 Views
Last Modified: 2012-06-21
I have a crystal report that has a couple of subreports. both subreports use a cross tab to create a set.

In one report, i calculate guest counts by server on the other I calculate items sold group by specific rules. now I need to calculate the ratio of Grouped Items divided by the guest count.

the data is in two different tables (flat dbf files). so the question is can I pass the array (result of the cross tab) from one subreport to the other (or to the main report) so I can do calculations?
0
Comment
Question by:czarubah
  • 2
  • 2
4 Comments
 

Author Comment

by:czarubah
ID: 35467071
I cannot really link the tables as that duplicates the data.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 35467263
No.  A cross tab is just a display method.  The data is not available for sharing.

You could create an array in the first subreport and share it with the second one.  You would have to do the calculations too build the array yourself.

mlmcc
0
 

Author Comment

by:czarubah
ID: 35467423
i am not sure I know how to pass an array, my array would have to be a two dimensional.
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 35467645
Crystal doesn't have 2 dimensional arrays so that part won't work.

You don't really pass between.
You use shared variables.

Basic concept

Main Report
Declare the variables
WhilePrintingRecords;
Shared NumberVar Array myTotals;
""

In the subreport
WhilePrintingRecords;
Shared NumberVar Array myTotals;
ReDim myTotals[5];
myTotals[1] := 7;
""

In the other subreport
WhilePrintingRecords;
Shared NumberVar Array myTotals;
myTotals[1] + myTotals[2]

mlmcc
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses
Course of the Month21 days, 7 hours left to enroll

804 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question