Showing results for 
Search instead for 
Did you mean: 

Use a Subreport but NOT print it

Former Member
0 Kudos

Hi all,

I'm new in Crystal Report and I have that question. I insert a Subreport into my Main report to have some values, but I don't need to print it, just to have the results. In Main report I have 2 details, 1 with the Subreport and 2 with the fields I need to print. How can I call the Subreport to get the values without have to print it??..

Any ideas ....


Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi James,

Thanks soo much, I was doing that the only thing I forgott to supress was the Header in the subreport.

For that reason the details was printing in the main report.

Thanks one more time


Former Member
0 Kudos

I searched the NOTES (kbases) section for: "shared variable" "subreport" "visible"

And found this:

In Crystal Reports (CR), subreports are frequently used to calculate and pass data to the main report. In many instances the business requirement is that the subreports not be visible to the end users. However, suppressing the subreport object or suppressing the section of the main report in which the subreport is located causes the shared variables to display incorrect data when passed to the main report.

How can you suppress a subreport but still pass a shared variable with the correct data?


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.