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
362 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crystal reports - finding a hidden reference 4 67
Formatting a Crystal Reports Report 9 76
Crystal Reports Subreport details 16 53
Crystal reports filter out records 2 21
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…
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 …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

14 Experts available now in Live!

Get 1:1 Help Now