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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Suppress Sub report when export repots..is it possible?

Status
Not open for further replies.

toshii1222

Programmer
Aug 2, 2001
13
US
Hi,

Is it possible to suppress sub reports or hide them when export my main report to Excel ? I can't hide the sub reports in my main report, because my main report uses the shared values from sub reports. If i suppressed sub reports, then the shared valus will be returned as NULL.

Please help~
 
Toshii,

I am in the process of updating Hammerman's Crystal 9 Level 2 training materials. Passing a shared variable from a subreport to the main report is covered in Workshop 10. Here is what Database Man, AKA Howard Hammerman, says about suppressing a subreport with a shared variable.

If the subreport (or section in the main report containing the subreport) is suppressed, the variable will not be seen by the main report.

Instead remove the border around the subreport, and suppress all sections of the subreport (in the subreport's design window), so it will not appear in your final report.

Roz
 
One method is to have two versions of a subreport. The first is invisible and passes back shared variables. The second displays the data, but sits in its own section, which is suppressed when there is no useful data. See thread782-477236 for more details.

Madawc Williams
East Anglia, Great Britain
 
The problem is that I exported the report to Excel, but the subreport is showing, which is not the result I wanted. I do need the shared variable from the subreport, therefor, suppressing the subreport is not the way to do (as Roz mentioned above). If i create the same subreport twice, one of them will still be shown after I export the main report to Excel. The report format in Excel will be different from what I see in CR designer.
Roz, I did remove the border around the subreport, and suppress all sections of the subreport. And yes, the subreport is invisiable in the report when I preview in the CR designer. However, it will appear in the report after I export it to excel.

So, is there any way can solve my problem? Please help!
 
I have the same problem as toshii1222, did anyone find a way to suppress subreport when exporting.
 
If you make the subreport very small, it should be effectively invisible.

Madawc Williams
East Anglia, Great Britain
 
Madawc

Nope, the data from the subreport still exports to excel...i need a way for user to click the subreport link and see the data from the subreport but this data cannot be exported to excel. I am using Crystal 8.0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top