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!

Supress Subreport and show the sum on the main report

Status
Not open for further replies.

SuperTime

Programmer
Dec 21, 2004
183
US
Crystal Reports 9
Sql Server 2000 Database

I have a report with Group Footer A that has a subreport that calculates the totals from the subreport and passes the values to the main report for the Grand Total in the Main report's footer.

This works fine and the report is the detailed report as it shows the vaules in the subreport.

I want to create a summary version that will just show the values in the Main reports footer section.
The problem is that if I suppress the section with the subreport the vaules are not passed to the main report.
What should I do in this case? Am I doing something wrong currently?

Please advice.

Thanks.
 
No, you're correct, that's the way Crystal works, unfortunately.

You might consider using real sql in an add command instead of a subreport, it will be faster, or better yet, a View or SP.

The alternative in Crystal is to shrink the subreport up as small as possible, which is still a problem.

-k
 
You can suppress all sections within the subreport, and format the subreport object to suppress when blank(format subreport->subreport tab->suppress blank subreport). Then in the section expert of the main report->highlight the section the subreport is in->check "suppress blank section". The shared variable will still pass.

-LB
 
Good point, LB, I keep forgetting that people use subreports JUST to return data and aren't displaying anything in them.

I do wish that you'd also encourage them to eliminate the subreports though by using real SQL.

SuperTime: As previosuly mentioned, a database object will be much more efficient, as would a SQL Expression. Supreports execute their SQL for every different GROUP in the report.

-k
 

I modified a report in Crystal Reports 10.0 and replaced it in a Visual Basic project of Visual Studio.net 2005. I have done this many times with other reports. I then ran the preview of the report from within VB (without going thru my VB code) and I get an error message saying that it cannot load file named crdb_query.dll. This method of viewing the reports has been working fine until yesterday and I really dont know what I did to break it. Any reports that were already in the VB project I can preview fine. It is just that the recent ones that were modified by CR and then added to the VB project are broken. They run fine in CR outside of the VB IDE. Help Help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top