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!

Exporting Values from Subreport to Main report

Status
Not open for further replies.
Apr 18, 2007
209
0
0
US
Hello friends , I have a small question.
I have three paramters and I have subreport where I pass values to main report, I linked subreport to main report on those three paramters. I have grouping on amin report, I placed the subreport in grp footer 3a and in 3b below section i am showing shared varibales and other details, but when group chnages it valuea are not chaning, fore example I enter three paramters values 33455,4434,5345.
I did grouping on prameter fiels in both main report and subtrreport. Suppose for value 33455 sum of total $ is 50 and for 4434 sum is 65, but my shared variable is alwyas taking the last value i,e 65. I am doing anything wrong?,my subreport shared vaariable formula is like max(amount,po) so on. Please any help on this?.
Thanks a ton.
Toby.
 
Yes, you do get two, and I'm asking which one you are choosing. You should be choosing {?P01}, NOT {?pm-?P01}.

-LB
 
That is right LB I am choosing ?po1. But I m getting last value from the subreport.
 
You may want to look into using shared variables to do this.
I have made summaries in subreports which get passed back to the main report via a shared variable.

in the sub, in any formula (including formatting formula) add a line like so

@result
shared numbervar TotalCost := <summed val>

in the main report

@GTResultBuild
shared numbervar TotalCost;
global numbervar GTCost;
GTCost := GTCost + TotalCost;

//that lives in the next group footer down from the subreport so it always happens after the sub

@GTResultShow
shared numbervar TotalCost;
//this just prints it out

Scotto the Unwise
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top