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

Sub Report Variable Problem

Status
Not open for further replies.

reidtw

MIS
Feb 10, 2004
74
GB
Festive Greetings!

A wee bit help please!

Using CR8 / ODBC / SQL

Shared variable is staggered to the next unassociated record but I cannot remember how to fix this...

Example

Code Company Name

CompanyA
CoA CompanyB
CoB CompanyC
CoC CompanyD
CoC CompanyE
CoC CompanyF

Also, D-F do not have a shared variable value but the code for CoC cascades down.

Any help would be great.

T
 
You haven't explained where the subreport is or what the shared variable is. Note that the subreport must be in a section above the one in which the shared variable is located. You need a reset formula in the main report to prevent repeated values in place of nulls:

whileprintingrecords;
shared numbervar x := 0;

Place this in a section either before the subreport, or after the section containing the shared variable.

-LB
 
I have/had a smiliar problem and the suggestion helped - added an extra detail line, but when i try and hid the detail a line that has the subreport on, the report does not return results. Any suggestions for that?

Thanks
 
DougNaf,

Suppress all of the sections within the subreport, and then in the main report select the subreport->format subreport->subreport tab->check "suppress blank subreport". Then in the section expert of the main report, format detail_a to "Underlay following section".

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top