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
361 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 100

Accepted Solution

by:
mlmcc earned 500 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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

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. …
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now