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

Passing Value from SubReport to Main Reports HEADER (eg above Subreport). Can this be done???

Status
Not open for further replies.

BeeBear2

Technical User
Sep 15, 2014
39
AU
Hi,

So I am trying to work out if there is a way to pass a subreport value to the main report HEADER while the subreport is in the main report FOOTER.

I know in theory you cant pass a value to a spot in the main report above the subreport, but I was hoping there was wealth of knowledge on here that had a way around it......

The subreport has a Count on a field (Total # of Records), which currently displays in the subreport header. I want to put all the subreport headers in the main report to fix an exporting data issue, but then this formula doesnt calculate.

Oh and I'm on Crystal 2016.

Thanks :)

 
There is no way to do this.
You can add the subreport in twice, with the first one hidden in a thin report header section with all fields in SR suppressed.
You can not suppress the section holding hidden SR but you can make it as thin as possible and then check underlay following section so that it does not impact layout.
Downside is that its an additional overhead on Database

Ian
 
Darn! Thats what I thought. Ah well, will have to manage as it is because I dont think adding a second copy of the SR will work due to the excessive load.

Thanks for your response.

 
Sometimes a duplicate subreport doesn't increase the load. Usually, when Crystal encounters an identical subreport (no change to the criteria or parameters) it doesn't hit the database a second time. I have used this to my advantage a few times:

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top