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

Passing Number from Sub-Report to Main Report

Status
Not open for further replies.
Mar 20, 2009
102
US
I have a situation where I have the main report data with the total amount, and I have a sub-report with monthly breakdown totals as follows:

--Main Report
1451 CORAL RIDGE AVENUE CORALVILLE 52241 $15,347.09
2345 Saulsbury Rd Muscatine 52761 $10,000.00
2403 5th Ave SE CEDAR RAPIDS 52403 $9,234.78

--Sub Report
1451 CORAL RIDGE AVENUE CORALVILLE 52241 2 0 8
2345 Saulsbury Rd Muscatine 52761 1 1 1
2403 5th Ave SE CEDAR RAPIDS 52403 4 0 5

I want the end result to be like this:

1451 CORAL RIDGE AVENUE CORALVILLE 52241 $15,347.09 2 0 8
2345 Saulsbury Rd Muscatine 52761 $10,000.00 1 1 1
2403 5th Ave SE CEDAR RAPIDS 52403 $9,234.78 4 0 5

I know you can share variables, but I am a little rusty on that. When sharing variables don't you have to join on the common field (in this case would be address)? If that is the case I tried that and it doesn't seem to work. Please advise as to how I can get the results I am looking for.

Thanks!!



 
Do you have some ID field that is unique to each row? Use that as your subreport link and then place the subreport in the detail section and have it display on the last three fields on the right, with all other sections suppressed.

-LB
 
Assuming in
1451 CORAL RIDGE AVENUE CORALVILLE 52241 $15,347.09 2 0 8
that 2, 0, and 8, are different fields (or even if it's one), delete all the fields except for 2, 0, and, 8. Suppress every section in the subreport besides the section the 2, 0, and 8. Link the subreport to the main report by whatever fields are here
1451 CORAL RIDGE AVENUE CORALVILLE 52241
and put the subreport on the same section as
1451 CORAL RIDGE AVENUE CORALVILLE 52241 $15,347.09
in your main report. If nothing is coming up on the first line and the ones following are wrong, insert a section below the one where you're placing the subreport, check the "underlay following sections" checkbox, and put the subreport in the new inserted section while keeping
1451 CORAL RIDGE AVENUE CORALVILLE 52241 $15,347.09
in the original section.

If I addressed your problem correctly and I make sense, I hope that helps.

-DJWW

 
No I don't have a unique id field and that is what's causing the issue. I will try what DJWW
suggested and see if that works.

Thanks!
 
Then create formulas in both main and subreport that concatenate the address fields and then link the two formulas to each other.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top