Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get a Crystal sub report not to print but still be able to use a shared variable

Posted on 2011-02-20
3
Medium Priority
?
369 Views
Last Modified: 2012-05-11
I have a sub report that has a shared variable with the main report.  The variable is calculated in the sub report and then printed in the main report.  Everything works fine if I don't suppress or hide the sub report.  Once I do hide it or suppress it my shared variable value only prints 0.  How do I get the shared variable to work without having to show the sub report?  Please let me know if you need any more information about the report or its shared variable.

Thank you
0
Comment
Question by:MrWeen
  • 2
3 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 2000 total points
ID: 34940313
If you suppress the subreport than it doesn't get run so you can't suppress it.

Do you need it to display anything?
If not then just put the fields on the report that you need for calculating the value.
Probably just the formula
Have all formulas display nothing

You can then use formatting to SUPPRESS a blank subreport
FORMAT SUBREPORT
Last Tab - SUPPRESS  BLANK SUBREPORT

You can supress the section if blank

mlmcc
0
 

Author Comment

by:MrWeen
ID: 34955496
Thanks mlmcc.  This works except for one thing.  The variable isn't changing after each item in the group.  It only keeps the value of whatever the last entry item was.  What I am using the subreport for is to calculate the total value of items on an order.  So  i am grouping by order #.  Each group prints all the other fields correctly except for the one that is the shared variable.  It is repeating the same number throughout the whole report.
0
 

Author Comment

by:MrWeen
ID: 34955925
Never mind I fixed it.  Thank you very much for your help.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying 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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
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

972 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