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!

Shared Var Question

Status
Not open for further replies.

digilantis

Technical User
Jul 16, 2001
19
US
I am missing something while trying to pass a shared var from a subreport to the main report and don't know what it is I am overlooking. Here is the setup
Main report has 2 groups account(character) and dmsid(character)
The linkage between the sub and main is
{tblConsultants.szdmsid} = {?Pm-tblProspects.szdmsid}
=========================================================
In the subreport( which is placed in the PageHeader of the Main Report) I have 1 group dmsid(character)with the folowing formulas

@cntSoldMTD
IIf({tblSold.dtSold} In MonthToDate,1,0)

@SendSoldMTD
WhilePrintingRecords;
Shared NumberVar SP_Sold_MTD:=Sum({@cntSoldMTD},{tblConsultants.szdmsid});

I place the @SendSoldMTD in the subreport footer
==========================================================
In the main report I have one formula

@GetSoldMTD
WhilePrintingRecords;
Shared NumberVar SP_Sold_MTD;
SP_Sold_MTD

I place the formula in the main report dmsid group footer and it pulls the var but it puts the first record from the subreport on page one of the main report, the second record from the subreport on page two of the main report and so on up to page 4, last page of the main report..it 's not matching id to id as the report is rendered?

Pointers?

Thanks
 
move your subreport to the group header 1 and see what happens.
 
I add a section to the GFS, Moved the formulas down then plopped the SR in GF2(1)--works good, thanks for the help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top