Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I hide a subreport, but use its shared variable? 1

Status
Not open for further replies.

Algernon83

Programmer
Jun 25, 2004
50
US
I'm working on a report that uses a subreport to generate a value, which is then displayed in the main report. This works as expected. However, the only purpose of the subreport is to generate this value; I don't actually want to show it. How can I arrange it that the subreport is not displayed, but its values are still calculated?

I even tried setting a formula to suppress the report header, which holds the subreport, which calls EvaluateAfter on the reference to the shared variable in the main report. However, the subreport still isn't run, and the value isn't calculated.
 
One workaround that I use is to make it really small, about 1px by 1px, remove the border lines, uncheck the 'can grow' option, and put it in the corner of the report or page header.
 
Smart! I found that what I also had to do was hide the "details" section in the subreport. If it's set to display, and the subreport doesn't have enough room, then only the lines that can be displayed are shown. If the details section is hidden, it's still calculated, and I get my value. Thanks for your advice, Eagle!
 
If you are using any version above 8.5, you can suppress all sections WITHIN the subreport, then in the main report, go to format->subreport->subreport tab and check "suppress blank subreport" and then go into the section expert->section containing the subreport->check "suppress blank section". No need to resize the subreport at all. If you are using 8 or 8.5, you do have to resize, etc.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top