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!

New page after __ visible records??

Status
Not open for further replies.

bpeirson

Technical User
Sep 28, 2005
85
CA
My report prints on an underlayed form. The form has some graphics at the bottom which will be printed overtop of if there are too many records on the page.

I thought the simple fix was to check the box "New page after __ visible records" and enter an appropriate amount.

When I do this the printout includes more visible records than the amount typed into the box.

What am I missing?

Brad
 
Never heard of this feature. What version of CR are you using?

-LB
 
I'm using Crystal Reports 2008 Version 12.

I found this check box in the "Section expert".

Start the "Section Expert", choose "Details" section in the left pane, then click on the "Paging" tab in the right pane.

LB, have you considered teaching this subject professionally?

Brad
 
Sorry, I don't have CR 2008. Are you saying that you are seeing more records per page than you enter into the box? Are you suppressing the details section based on some criteria or are you using any group selection criteria?

-LB
 
The details section has no suppression. The Report Header and Footer are suppressed. The Page Footer is suppressed.

The Page Header includes an underlay form which fills the entire page. If I allow the page footer to be displayed then Crystal informs me that the header and footer are too large for the page.

There are three items displayed in the details section. The first is a part number field taken directly from the DB. The next two are formulas which display "" if the record does not exist and prepend the record with text if it does exist.

All three of these items are inserted into a text box in the details section so they format in an aesthetically pleasing fashion. The gridlike formatting that results by placing them directly in the details section is considered unacceptable.

 
It seems that what I am taking as a record is being treated as a section by Crystal.

Another checkbox beside the visible record one is "New page after End of section". When I check this only one of my "records" appears on each page.

So, I really need to display a fixed number of sections per page.

Any help is appreciated, Brad.
 
If you place the special field "recordnumber" in the detail section, does the last recordnumber on the first page correspond to what you entered in the box for "new page after __ visible records"? By record, CR means the number of times the detail section prints. If you have multiple lines in your text box, then you could do the equivalent of the section formatting manually, but I'd have to know how many lines were in the text box.

-LB
 
The record number displays as I had expected. It starts at 1 and increases by +1 with each new part down the list.

The text box I have is allowed to grow. Most of the time it will be 1 line but it can grow to two lines (about 10% of the time).

The built in help regarding "New Page After __ Visible Records" has no explanation other than check the box and enter a quantity. The Business Objects website has no extra help.

Brad
 
We have decided not to include the first item in the text box. This means that each record will only take a single line 100% of the time.

Brad
 
So now the function is working as you would expect? You didn't answer my question about whether the recordnumber matched the entry in the box either.

-LB
 
I meant the records are numbered as I expected, starting at 1 and working up. The function still does not work, I enter 15 for the number of visible records and 28 are displayed at printout. I'm using a test printout with over 300 records so I don't get a false positive due to a coincidental end of section or group landing where I expect a page break.

My last post was to let everyone know that the text box will be limited to one line only. I realize it would be tougher to place a page break when the number of lines per record is changing.

The comment I made about expected record numbering was made because I assumed that the numbers would be sequential. I didn't know how to verify that. Just because I thought it was logical didn't mean the creaters of Crystal found it logical. It's nice to see that some of my thoughts coincide with reality.

And thanks for your patience LB, I'm a bit of a newb with databases in general let alone Crystal.
 
Please also clarify whether when you count your visible records manually you are counting "lines" in sections other than the detail section.

You can do this manually by creating a formula like this:

//{@cnt}:
whileprintingrecords;
numbervar cnt := cnt + 1;

Place this formula in each visible section (GH, detail, etc., but not the page header or page footer). This also assumes that each section is the same height.

Then go into the section expert and select each visible section one at a time->new page after->x+2 and enter:

not onlastrecord and
remainder({@cnt},15) = 0

-LB
 
I put the formula @cnt into the Group header and details section.

In the "Section Expert" the "New page after" is not directly available for the details section. This choice has two sub categories, "End of Section" or "__ Visible Records". I think the "End of Section" isn't what I need. When I put your code into the "__ Visible Records" X-2 section the program insists that the {@cnt} be a constant.

There is a "New Page Before" for the Details section in which your code is accepted. I have tested the report with your code in the Group Header and the Details section. The code is only effective when place in the Details section.

The Good news: The report is limited to 15 records per page.

The Bad news: The entire report is repeated until {@cnt} reaches 116,800.

I am getting a 7300 page report with each record listed in sequence 15 records per page. When the last record is printed the Group header is printed followed by the full set of records again. The full printout is done 400 times for 291 records. I've changed from 12 records per page to 24 records per page. The report is always repeated 400 times. I'm Baffled.

Brad
 
I would have used "end of section" I think. But I don't think my formula would force any repeating records, so I'm not sure why that is happening. It would only count up to the actual number of records plus instances of group headers. Do you have records you are suppressing? If so, you would have to build the opposite of the suppression criteria into the count formula.

-LB
 
LB Your code works as advertised.

Problem one: I seem to have had poorly linked data, I think a redundant field caused the report to create a new group for every record. It then displayed every record for every new group.

Problem two: My front end software was suppressing 109 records which means the total number of records is 400. This clarifies for me where the 400 x 291 = 116,800 came from.

After cleaning up my links the report prints as required. I certainly appreciate your patience and help on this.

I have an open thread on the SAP Community Network (it's not a great acronym) concerning the "New Page After N Visible Records" feature. I'll post the fix for that function if I get one.

Brad.
 
For those who have been patiently waiting for the answer.

My front end is embedded with a previous version of Crystal. It does not support this function which is new to 2008.

Brad
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top