Tutorial - Lesson 14

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

 

There are times when you want to force a page break in a report to make it more visually appealing, or when you need to physically separate different sections of a report for mailing or workload requirements.  Report Builder makes this very easy to accomplish.

 

The first step is adding a Sorting Band to your report; the first sort (or primary sort) should be on the database field that you want to perform the page break with. For example, if you want to separate a report based on the state field, where the start of a new state abbreviation code starts a new page you would create that Sorting Band on the state database field. You can have additional Sorting Bands if you desire, but the first Sorting Band needs to be created using the database field that will be broken into sections on the printed report.

 

After adding the Sorting Band you will create either a Group Header or Group Footer detail band in the report. Either band will work as desired; the difference is where contents of that report band are printed. A Group Header band is printed at the top of the page; a Group Footer band is printed at the bottom of the report page.

 

To create a Group Header or Group Footer band select from the main menu the Band menu option, then New, then the desired Group band. The mouse cursor will change to the hand icon; place the hand icon directly on the first Sorting Band and left click the mouse. A new band (Group Header or Group Footer) is created inside your Report Formatter screen.

 

Right click on the newly created Group report band, then select the Band Properties pop up menu entry. A pop up dialogue window appears with various options available to you:

 

Group report band properties page

 

As you can see, the Report Builder gives you a lot of control on how to print information in the new Group header/footer report band. By default, no setup check boxes are initially selected.

 

To see how different settings affect the final output let's start with a Group Footer band:

 

Group Footer Band

 

As shown above a frame was created with the text of "State Code: " entered inside it, with the frame borders enabled on all 4 sides of the frame. This will create a nice box effect around the information when printed. Another frame was created that contains the state database field with no frame border. This frame was then moved INSIDE the first frame, which gives an illusion of one large box surrounding both frames!

 

Another way of creating a nice box effect around two or more frames that are side by side: for each frame set the border to be displayed (use the border buttons that are displayed in the toolbar); for the left most frame don't display the right border; for the second frame don't display the left border.

 

Using the default report (used throughout this tutorial) and the above Group Footer information here is how the report output would change based on different settings:

 

Print Selection, if expression evaluates TRUE: You can elect to only print information contained in the new report band when a specific condition evaluates to TRUE; for example, you may want to make information stand out for respondents who have completed the test.  If they have completed the test you could have special text that prints to reflect this.  Naturally you would use the Dictionary to help define the database condition that evaluates to TRUE for this action to occur.

 

Explicit Page Overflow Before Band Printing: Print the Group Footer band when the selected database field data changes at the beginning of the next group of information (i.e. always print this band when the selected field data changes at the beginning of the next group of information). For example, if you have 10 database records and the first 3 equal "AZ", when the state database field changes value to "CA" the Group Footer is printed on the next page before database records containing State=CA are printed to the page.

 

Explicit Page Overflow After Band Printing: Print the Group Footer band when the selected database field data changes at the end of that group of information (i.e. always print this band when the selected field data changes at the end of that group of information). The next page that prints will contain new database field information.

 

Print This Band At The Same Page With Prior: This attribute specifies that the Detail, or Group Header/Group Footer structure (contained within a Sorting Band) is always printed on the same page as the band immediately preceding it in the Report Formatter screen. This ensures that the structure is never printed on a page by itself, thus eliminating "orphan" bands. An "orphan" band in this case is defined as a Group Footer, or last detail item in a related group of items, that are printed on the following page separated from the rest of it's related items.

 

Print This Band At The Same Page With Next: This attribute specifies that the Detail, or Group Header/Group Footer structure (contained within a Sorting Band) is always printed on the same page as the band immediately following it in the Report Formatter screen. This ensures that the structure is never printed on a page by itself, thus eliminating "orphan" bands. An "orphan" band in this case is defined as a Group Header, or last detail item in a related group of items, that are printed on the previous page separated from the rest of it's related items.

 

Print After This Band The Text Field: This attribute is used whenever you wish to print a database field that is a large MEMO type database field, which are commonly used to contain large amounts of text (such as notes). A normal Frame will be unable to print a memo database field within it's defined space; by checking this feature the selected database field will be printed after the report band in it's entirety without truncation. If there is insufficient space to print all of the information the remainder of the field information will continue printing on the next page.

 

To recap; in this lesson you learned:

 

How to force a page break when database field information changes for the current database sort

 

How to create a Group Header and Group Footer report band, and the differences of the two

 

How to restrict printing a Group Header / Group Footer report band based upon a specific database condition evaluating to TRUE

 

How to create an illusion of one frame border surrounding two or more Frames

 

How to print a database MEMO field that contains a large amount of information without truncating it's information