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

Problems placing a subreport in a report header.

Status
Not open for further replies.

losthorizon

Technical User
Nov 7, 2001
63
US
When we re-run a Crystal Report containing a subreport, incorrect data appears. How reliable is it to place a subreport in a report header section? I've read elsewhere that it's unreliable to place a subreport in the report header section, but that's the way the report currently stands. Without changing either the report, or the database, the output appears to be incorrect, some of the time. How reliable is it to pass a shared variable between the main report and it's subreport? We are running Crystal Reports 8.0 on a Windows 2000 Professional platform, using both Access 97 and Visual Basic 6. We've also referenced Mr. Peck's book (pp 294 - 295) for Version 8.0 "The Complete Reference". Your suggestions are appreciated.
happy.gif
 

"When we re-run a Crystal Report containing a subreport, incorrect data appears. How reliable is it to place a subreport in a report header section? "

very as long as it is placed there for the right reasons

"I've read elsewhere that it's unreliable to place a subreport in the report header section, but that's the way the report currently stands."

Not my experience....90% of my reports have at least one subreport in the report header. My reports are designed to work on local databases which have the same table structure...one table contains information that is specific for that site...eg: Stock number masking. I pick this info up in a report header subreport with absolutely no problem.


"Without changing either the report, or the database, the output appears to be incorrect, some of the time. How reliable is it to pass a shared variable between the main report and it's subreport?"

100% in my experience as long as the subreport executes before the shared variable is required...but that is a design problem...nothing to do with the reliablity of the exchange.

Tell us what your problem is and explain the structure of your report....there is no problem with a properly designed MainReport/SubReport relationship if the reports are designed properly.
 
Thanks for the prompt reply. Allow me to get more input & details from one of our programmers, and then I'll post.
 
The report appears to be working correctly now that we deleted some extraneous formula fields. The one subreport remains in the report header and we also deleted a subreport that may have been called by a duplicate name. We also made all of the variables uniform, and all now use the same case (smallcase was changed to all capital letters for consistency). In other words, we removed the junk that was in the report. All results appear to be consistant now. Thanks for your concern.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top