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
365 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

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

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…
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…
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 …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

738 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