crystal reports viewers, crystal reports schedulers, view crystal reports, report analyzers, burst reporting, report scheduler
 
view crystal reports, rpt viewer, crystal reports viewers, crystal reports schedulers, report analyzers, burst reporting, report scheduler
desktop viewer, crystal reports viewers, crystal reports schedulers, report analyzers, burst reporting, report scheduler

Crystal Reports Tools: Improve Performance While Saving Time and Money

  Resources  
Best sellers:
cView
Report Analyzer
cViewSERVER
ReCrystallize
 


Articles:
Administration
Advanced
Basic
Crystal eNL
Database
Financial
Problems Solved

Books:
CR Books

Database Books
Developer Books

 
Tools:
Analyzers
Bestsellers

CR Schedulers
CR UFLs
CR Viewers
DataBase Tools
Graphics
International
Mail UFLs
ReCrystallizePro


Add'l:

About us

Contact Us
cViewSUITE Ppt
Support

 

CrystalReports
on Steroids

Crystal Reports Basics: Using Page Breaks

This is based on the book, Crystal Reports: A Beginner’s Guide. For more detail and explanation, plus practice exercises, order the book here.

In Microsoft Excel, you can specify page breaks. But, these are based on the number of rows per page. Crystal Reports provides even more functionality by allowing you to insert logical page breaks.

That is, page breaks between groups. You can do this from the Format | Section menu. Crystal Reports: A Beginner’s Guide provides a step-by-step procedure.

Here's a short tutorial on that:

One of the reasons for creating a group in Crystal Reports is to have each group start on a new page.

There are several situations which can be easy to control if you understand how the section expert works with "New Page Before" or New Page After." You can use either of these properties to set page breaks, but we find it is simpler to focus on using just one of these.

If you’ve just got one level of group in your report, set your "New Page Before" on Group Header 1. To get rid of the blank first page this creates, you also need to suppress the "Report Header" section.

If you have multiple groups in your report, and you want a page break for a lower level group (e.g. Group 3), suppress the higher level group headers, and set "New Page Before" on your selected group (in this case Group 3). Depending on how often you want to see the higher level group names, you can put the Group 1 Name and Group 2 Name objects in either the Page Header or the Group 3 Header sections.

 

You can also make page breaks conditional. This is ideal for fixed layout reports like invoices and cheques. Use a variable to behave as a line counter and keep track of the lines as you print them.

In the Page Header: WhilePrintingRecords; Numbervar linecounter:=0;

In Each Printing Section (including details): WhilePrintingRecords; Numbervar linecounter:=linecounter + 1;

Conditional "New Page Before" in the details section: WhilePrintingRecords; Numbervar linecounter;

linecounter>60 //or replace the 60 with the number of lines you can print

This technique will also work across multiple subreports. If you are using subreports, you will need to declare the variables as shared. The prize goes to Trevor Nunes of UpTime for working this one through with us.

 

And maybe you don't want page breaks in the middle of certain blocks of text or text and graphics. No problem. One of formatting options on objects and sections in your report is “Keep Together”. Normally this is ticked to say that you do not want the object split over a page break. For database fields, formulas and even charts and maps that is probably the way you want your report to behave, so leave the default tick as given.

However, there are two objects that you might need to have behave differently. A crosstab or a subreport can grow dramatically in size during the processing of a Crystal Report. There may be times when you want the entire object on its own page, but otherwise, you might want to see as much as you can on the current page, and then show the rest on subsequent pages. 

Untick “Keep Object Together” if you want to see some of the object fit on the current page. You will also need to untick “Keep Together” for that section in the section formatting. 

 

For even more functionality, you can use third-party programs, such as the ones available here.

 

This article is copyrighted by Crystalkeen, Mindconnection, and Chelsea Technologies Ltd. It may be freely copied and distributed as long as the original copyright is displayed and no modifications are made to this material. Extracts are permitted. The names Crystal Reports and Seagate Info are trademarks owned by Business Objects.