Titles for Cross-tabs that spill onto horizontal pages

Sunday 11 February 2018 @ 5:02 pm

When a cross-tab gets too wide, it generates a ‘horizontal’ page to the right of the original. If you were to print the report to paper, these horizontal pages would print as separate pieces of pages. However, page header objects do not automatically repeat on these pages. So, any titles that you have in your page header will be missing on these horizontal pages. You have two options to get the titles to repeat:

1) If you want the fields to appear outside of the cross-tab, you can format them to repeat on each horizontal page. Right-click on the field, select “Format Field” and go to the common tab. You should see a property called “Repeat on Horizontal Pages”. Checking this property will cause the object to print again automatically for every horizontal page.

2) If you want the title to be part of the cross-tab, you can put your title into a formula and use that as your first column field. This title can incorporate parameter fields and can also include a carriage return character to print on multiple lines. An example formula might be:

"Sales by Region and Shipping Mode" & Chr(13) &
"Orders From: " & ToText ( Minimum ( {?Order Range} ) , 0 , "" ) &
" To: " & ToText ( Maximum ( {?Order Range} ) , 0 , "" )

The key is that the formula has to start with WhileReadingRecords. This makes it eligible to be used as a cross-tab column. You make this field the first “Column” field in the cross-tab.  You should check the “suppress subtotal” property for this group level so that it doesn’t generate duplicate totals (cross-tab Expert, customize style, highlight this formula and check the property on the left).  And if the formula includes Chr(13) (to generate a second line) you will have to adjust the height of that cell to show the second line.  It won’t grow automatically.

Leave a Reply

Recrystallize Pro

Crystal Reports Server