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!

Get total page count from sub report - Urgent

Status
Not open for further replies.

manjyo

Programmer
Jul 2, 2003
15
IN
hi
i am having a main report and one sub report is inserted in it. Some times the subreport can have more than one page. I am printing the page number in the page footer section of the main report becacuse the sub report is not having the page header and page footer sections. When the sub report data is coming in more than one page then in the page footer i want to print the text "Cont... in the next page.. " and so no. I had created one shared variable and in side sub report I had assigned the total pagecount. But in the page footer section of the main report its value is only zero. It may be because the page footer section is printing before the subreort section. Any body can help me on this?

Thanks in advance.

Manoj N.
 
Thanks for your response

The subreport is located in the group header section of the main report.

Thanks

Manoj N.
 
I don't think you really need to pass a shared variable. Try creating two formulas in the main report:

//{@flag-no} to be placed in the details section:
whileprintingrecords;
numbervar flag := 0;

//{@flag-yes} to be placed in the group header section:
whileprintingrecords;
numbervar flag := 1;

Then create a text box containing "Continued on the Next Page" and place it in the page footer. Then right click on it->format text->common->suppress->x+2 and enter:

whileprintingrecords;
numbervar flag = 0;

-LB
 
Thanks again
I am having other subreports in main report in the gruop header section. If the sub report is having a single page then the text should not be print and at the last page of the sub report also.

Regards
Manoj N.

 
In all the formulas, make the variable a shared variable, by adding "shared" in front of "numbervar". Add {@flag-no} to the other group header sections that contain subreports, if you don't want the message to print when they are executing. Create the same {@flag-no} formula in the subreport:

whileprintingrecords;
shared numbervar flag := 0;

And place this in the subreport report footer.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top