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

Subreport - Continued on next page

Status
Not open for further replies.

kringli

MIS
Nov 19, 2007
10
US
I am using one subreport in the details section. I want the group header to print on every page except where the subreport information carries over to the next page. I then would like the group header to print following that information on that page. In addition, when the subreport info continues on the next page I would like to print 'Continued on the next page' but only when this occurs for the subreport information. I have tried using shared variables but I cannot get this to work. Any help would be much appreciated
 
Is one instance of Db crossing pages (one subreport execution) or do you mean the subreport fires repeatedly while details are being read, so that one instance of the sub is the last row on one page and the next instance of the sub is the first row on the next page?

-LB
 
I have a detail line on the main report (Detail a). I added a second detail section (Detail b) where the subreport is located. The report will print Detail a (one line) and the subreport will follow and that process continues on. Basicially it is a workorder in the main report and then the details in the subreport. So to hopefully answer your question it is one subreport execution crossing pages. Ideally if I could get something that would work as a page footer within the subreport.
 
Can you clarify whether you want to see the group header belonging to the subreport (the group header that appears on the previous page) to print in the group footer when the subreport crosses pages or whether you are saying you just want to see no repeating group header on the page, with the next group header showing below the subreport?

-LB
 
I want to see no repeating group header on the page, with the next group header showing below the subreport. I think I have the 'continued on to next page' figured out. But the header issue is giving me some problems. I don't want the header to print when the subreport crosses pages because it doesn't match the subreport data and may be confusing for the user. However, I do want it to print after the subreport for the next group. The issue is that in some instances, the information following the subreport is not the main group (Product Code) but a subgroup (Workorder).
 
Okay, I thought you wanted something more complicated. Note that you could allow the repeating group header and to eliminate confusion, add a formula to the group header:

if inrepeatedgroupheader then
"Continued from the Previous Page"

If you still want to suppress the repeating group header on the second page when the subreport crosses pages, you can do this:

Create a formula:

//{@true} to be created in the field explorer->formula->new and placed in the group header of the group you want to conditionally suppress:

whileprintingrecords;
shared booleanvar flag := true;

In the subreport, in the report footer, add this formula {@false}:

whileprintingrecords;
shared booleanvar flag := false;

Then in the main report, go to the section expert->group header->suppress->x+2 and enter:

whileprintingrecords;
shared booleanvar flag;
inrepeatedgroupheader and
flag = true //Note no colon

To get the message in the page footer of the report when the sub crosses pages, use this formula:

whileprintingrecords;
shared booleanvar flag;
if flag = true then//note no colon
"Continued on Next Page"

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top