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

How can I capture the number of pages that makes subreport 1

Status
Not open for further replies.
Aug 2, 2005
31
US
Crystal Version 8.
environment:
Main report with 2 large subreports
Question: How can I capture the number of pages that makes subreport. Of course the subreports are generated dynamically. I have combed through the forum but havent seen anything like that. Plainly, what I am looking to get is:

If the entire report have 30 pages, and subreport 1 have only 5 pages, subreport 2 have 24 pages, and 1 page is for the main report.

How can I calculate and extract the numbers of pages that makes up subreport 1 and 2. The two reports are in the details section.

Any help will be appreciated.

-b
 
I think your idea is a good one, and I'm sorry I didn't think of it first. I'm not sure why you are concerned about blank pages. You might want to create a fake group header to use for SR1 in order to have the page footer available in the main report. You could create a formula that is true for all records, e.g.:

whilereadingrecords;
1

Insert a group on this and then remove the group name. Use this as the report header and suppress the real report header.

-LB
 
lbass, any suggestion for getting the page numbers corrected. Here is now the configuration of the report.

RHa - blank
RHb - SR1
PH - none
Groups 1- 8, including details, GHs, GFs, for main groups of the main report - Former SR2

RF - SR3
PF - Common footer for all 3 report areas - SR1, Main, and SR3

There are some items there that should only print when SR1 print, or when Main (SR2 - not a subreport any longer ) print, or when SR3 print.

Any thouhgts on how I can get these fields to print as needed based on when these other reports prints? I have tried using the previous solutions up there, but does not seems to work.

Thanks.
 
You haven't explained what's wrong with the page numbers, so I can't tell what help you need. You will have to follow the suggestion in my last post to get a page footer for SR1 though.

The same logic should apply as in my earlier suggestions though.

-LB
 
Here is another details.
RHa - blank
RHb - SR1 - subreport
PH - blank - suppressed
Groups 1- 8, including details, GHs, GFs - main groups of the main report.

RF - SR2 - subreport in report footer
PF - Common footer for all 3 report areas - SR1, Main, and SR2

There are some items there that should only print when SR1 print, or when Main report print, or when SR3 print.

Any thouhgts on how I can get these fields to print as needed based on when these other reports prints? Here is an example:

Page 1 -infomation from SR1 - Page footer should have unique_text1 and page N of M
Pages 2-4 - information from Main report - Page footer should have unique_text2 and Page N of M
Pages 5-9 - information from SR2 - Page footer should have Page N of M and unique_Text3

And when one section is absent, their unique_texts should be absent as well, but page NofM should continue to print.
Note:someof the unique text are not from a db, they are free static texts

I did followed the supression solutions earlier. i guess difference is that, now, I have a main report that was a subreport before and 2 subreports., earlier both sub report were is report footers, now, only 1 report in RF, and the other in RH, and a main report.

Cant figured it out... My brain is fried, been working on this project of 2 weeks now. driving me crazy...

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top