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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

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. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

770 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