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!

How to run two reports at once 1

Status
Not open for further replies.

ramc2000

Technical User
Nov 8, 2002
60
GT
Hi, I need to print two reports at once, that is, by providing a parameter value to my first report, I'd like to trigger the printout of a second one.

I've heard one of the ways (probably the only one???) to do this is using subreports. Now, I know how to link a subreport to a main report, but I'm confused trying to determine what section of the main report should I insert the subreport into. Basically I need to print the two reports on different pages.
Both reports have one group section.

There are probably third party tools to accomplish this but I really want to explore the option to do it directly in CR first (8.5), any help will be appreciated.
 
Hi

create a print report
insert your first report in the detail a section and then your subreport in the footer
they will print on after the other one

cheers

pgtek
 
Hi
did you mean print 2 report at the same time?
one been the main and then the sub report?

I don't think this is possible

cheers

pgtek

 
Are each of the reports grouped on the linked field, e.g., customer ID? If, for example, you had summaries in your group 1 header in the main report, you could use the group 1 footer for the related subreport. To create a new page for the subreport, format the group footer section for new page before and also check new page before for the group 1 header with the condition: Not Onfirstrecord

-LB
 
lbass, yes, both reports are grouped on the linked field, but the summaries for my first report must be on the group footer.... could I insert a new section, group footer b, and do what you describe above???
 
Excellent, this is working just fine.... just a follow up question, I want to use the special field "page N of M" in the group header of the main report but now that I basically have two different reports in one, the value of "M" I'm getting is at least one over what it should be... do you happen to know how to handle this?? I know I won't be able to use "page N of M" anymore... Thanks.
 
If you are using a parameter to limit the number of groups to one instance per report and the subreport is always only one page long, then you could just replace Page N of M with:

totext(pagenumber,0) & " of " & totext(TotalPageCount-1,0)

If you will have multiple groups with a few pages followed by a subreport of multiple pages and then a few more pages followed by a subreport of multiple pages, let me know.

-LB

 
I am using just one instance of the group per report but unfortunately, the number of pages of both the subreport and the main report is variable, hence I can't use TotalPageCount-1....
 
By any chance, does the number of pages of the subreport = the number of pages of the main report? Then you could use:

totext(pagenumber,0) +" of "+totext(totalpagecount/2,0)

-LB
 
No.... the number of pages of the reports do not follow any known pattern, they're both coming off data of a very random nature.
I wish there were some formula that could pull the page number where the group breaks...
 
Since you are only displaying one instance of the group per report, you can move the subreport into the report footer. Then go to format section->group footer and check reset page number after. Now Page N of M will reset before the subreport prints. If you place it in the page header, you will have the subreport numbered appropriately from 1 to M as well.

-LB
 
That did the trick...as it usually happens the solution wasn't that complicated. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top