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

Controlling 2 subreports

Status
Not open for further replies.

befine

Instructor
Apr 18, 2002
79
US
I have a report with 2 subreports. Sub1 in DetailsA and Sub2 in DetailsB
The final output should be:
Page 1 has records 1-10 from Sub1 and records 1-10 from Sub2
Page 2 records 11-20 from Sub1 and records 11-20 from Sub2
Etc etc
Page 10 records 91-100 from Sub1 and records 91-100 from Sub2

I’ve worked a lot with shared variables and passing values back and forth from main report to sub and back, but I’m stuck on this one.
I have setup a variable in the main page header to pass the number 1 to the subs. It gets incremented in the page footer. I’m stuck on how to get the subs to print just the first 10 records and then the second 10 etc.

Any help is greatly appreciated.
Brian
 
I don't think this is possible if you have the sub reports in two diffetent bands. The method typically used is to force a new page afeter a condition is met.

With the subs being in diffeernt bands this would still work, but you would end up with the pages for band A then the pages for band B.

If you can cram them in the same band, you can use the following - just use it in both subs.

Formula should be place in the "New Page After" conditional formatting for the band.

if onlastrecord then false else
if recordnumber >pagenumber * 10 -1 then true else false Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top