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

Shared Variable from Unlinked subreport to main report?

Status
Not open for further replies.

bandarna

Programmer
Jan 2, 2003
122
0
0
US
I need to pass values from unlinked subreport to the main report. I have created a shared variable in my subreport using my summary field. See the code below:

whileprintingrecords;
shared currencyvar v_jul_comm_amt := sum ({@Jul_Comm_Amt})

and then I have used below formula Colum code in main report.
whileprintingrecords;
shared currencyvar v_jul_comm_amt

but the main report is displaying zero. I am not sure what is wrong in the main report code.

I tested in subreport to see if it is populating jul_comm_amt, it is working.

Is there something wrong in calling shared variable in main report?

Note: sub report is not unlinked. Is that an issue to use shared variables between sub and main report.
Any quick response would be appreciated

-NB
 
I answered your other post. Please do not cross-post.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Thanks Madawc. sorry for cross-posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top