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

Create 7 pages for each record

Status
Not open for further replies.

Lightbug3

Programmer
Mar 30, 2006
15
US
Hi all!

I am running Crystal Reports 11. The report I created has varying pages per record and I would like to make each record have 7 pages. Is this possible?

For example:

Total number of pages in report: 20
Record 1: 5
Record 2: 6
Record 3: 4
Record 4: 5

I would like all of the records to have 7 pages and the whole report to have 28 pages.
Record 1: 7 (last 2 pages will be blank)
Record 2: 7 (last 1 pages will be blank)
Record 3: 7 (last 3 pages will be blank)
Record 4: 7 (last 2 pages will be blank)

Thanks.
Danielle
 
That would depend on why there are varying pages,and where the fields are within the report.

A record generally takes up 1 line of 1 page.

Is there grouping in the report, are you using new page after/before?

You can keep track of page numbers with a variable if you're using grouping.

You need to post real technical information.

-k
 
This report is a claim history for a company. Therefore, the report is grouped by person and the records are thier claims. I would like every person to have 7 pages.

Keeping track of page numbers with a variable would be great; but, how do you add blank pages if the last page of the group isn't 7?

Thanks.
 
Right click the group footers and select insert section 6 times below, then turn on the New Page Before for each.

Then in the Suppression for the sections base suppression on the variables.

group header:
whileprintingrecords;
numbervar MyPages:= 0

Details:
whileprintingrecords;
numbervar MyPages:= MyPages+1

group footer sections suppression, second one:
whileprintingrecords;
numbervar MyPages;
MyPages < 3

group footer sections suppression, third one:
whileprintingrecords;
numbervar MyPages;
MyPages < 4

...etc...

-k
 
This looks good, except every detail record will not be one page. I don't know when the page break will be in the detail section.
 
Then you'll need to use the pagenumber function to do this.

You really don't like sharing information here do you?

How do you know it will never exceed 7 in the future if you don't know when it is or why?

-k
 

What is the pagenumber function?

I don't know what information you want me to share. It is a big report. I can give you the basic layout. Please let me know the information you are looking for and I will be happy to share it.

Page Header
Group Header - ZipCode (suppressed)
Group Header - MemberID (New Page Before - starts a new Member)
Group Header2 - MemberID
Details
Group Footer - MemberID
Group Footer2 - MemberID
Group Footer3 - MemberID
Group Footer - ZipCode (suppressed)
Page Footer

I don't know that the Member's pages will not exceed 7 pages. As of right now they haven't. This is a request by a client and I cannot tell them I can't do it the way they want it. Therefore, if the pages exceed 7 we will have to deal with it at that time.

Thanks.
 
OK, so here's another approach:

group header:
whileprintingrecords;
numbervar StartPage:= pagenumber;
numbervar EndPage:= 0;

group footer sections suppression:

group footer B section:
whileprintingrecords;
numbervar StartPage;
numbervar EndPage:=pagenumber;
Numbervar pagediff:=(EndPage-StartPage)+1
Pagediff > 2

group footer C section:
whileprintingrecords;
Numbervar pagediff
Pagediff > 3

group footer D section:
whileprintingrecords;
Numbervar pagediff
Pagediff > 4

...etc...

So you'll get blank pages now, I guess that's what you want...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top