Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: how to use Shared variables and supress subreport Post Reply Post New Topic
<< Prev Page  of 2
Author Message
willz06jw
Newbie
Newbie
Avatar

Joined: 10 Dec 2013
Online Status: Offline
Posts: 3
Quote willz06jw Replybullet Posted: 11 Dec 2013 at 11:00am

--From http://scn.sap.com/thread/1038505


In Crystal Reports 9 and later, you can suppress a subreport but still pass a shared variable with the correct data to the main report by following the steps below:

 

 

In the Subreport

 

-


 

 

1. Remove all conditional suppression formatting formulas.

 

2. Delete all drawing objects such as boxes, lines, etc.

 

3. Suppress all remaining subreport objects such as database fields, formulas, etc.

 

4. For all sections that contain no objects, select the 'Suppress' option in the Section Expert.

 

5. For all sections that contain suppressed objects, select the 'Suppress Blank Section' option in the Section Expert.

 

 

In the Main Report

 

-


 

 

1. Select the 'Suppress Blank Subreport' option in the subreport Format Editor.

 

2. Remove all borders from the subreport object in the subreport 'Format Editor'.

 

3. Select the 'Suppress Blank Section' option in the 'Section Expert' for the section containing the subreport.

 

 

Background Information

 

-


 

 

When working with subreports, the 'Suppress Blank Section' option forces CR to evaluate the subreport contained within the section to determine if the final subreport output is blank. The 'Suppress' option allows CR to bypass the subreport completely, because the section is suppressed. By forcing Crystal Reports to evaluate the suppressed shared variable formulas in the subreport, the data can be correctly passed from the subreport to the main report even though the subreport is not visible to the end user.

IP IP Logged
GreatLakes
Newbie
Newbie
Avatar

Joined: 09 Apr 2019
Location: United States
Online Status: Offline
Posts: 1
Quote GreatLakes Replybullet Posted: 10 Apr 2019 at 7:37am
DBlank thank you very much for explaining how to perform calculations using suppressed fields. I was using a subreport in my main report, and couldn't get the calculation to work without placing the calculated field into a section below the main line of information. Your solution of putting the subreport ahead of the main line and suppressing the subreport fields and suppressing the blank subreport section worked wonderfully.
IP IP Logged
<< Prev Page  of 2
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.016 seconds.