Crystal Reports 2008 provides a number of formatting options
for cross tabs. Since I lack the talent for color coordination or a taste for
design, I usually choose a style included with Crystal Reports for my cross
tabs. The “Style” tab is found on the Cross-Tab expert and provides 17 styles
to choose from.
Figure 6: Cross Tab Expert Style
We are going to skip using one of the included styles and
try to make the cross tab presentable ourselves. I find that total columns look
more presentable on the right of the cross tab.
1.
Right click on the cross tab and select “Cross-Tab Expert”.
2.
Select the “Customize Style” tab.
3.
Ensure the “Grand Total” field is selected in the Columns collection.
4.
Un-check the “Row Totals on left” check box.
Figure 7: Customize Style
The next formatting option that we will complete is making
the totals more visible. We will accomplish this by making the background color
gray.
1.
Ensure you are still in the “Customize Style” tab of the Cross-Tab
Expert.
2.
Ensure the “Grand Total” field is selected in the Columns collection.
3.
Select the color gray from the Background Color box.
Repeat the steps above the “Grand Total” field in the Rows
collection. Next we will make it easier to distinguish the customer groups.
1.
Ensure you are still in the “Customize Style” tab of the Cross-Tab
Expert.
2.
Select the “Customers.ContactName” field from the Rows collection.
3.
Select a navy blue color from the Background Color box.
Figure 8: Report with formatted totals
The cross tab is still hard to read. The black text on the
navy background is not very readable. One of the nice features about Crystal
Reports cross tabs, is that you are able to format the contents of each cell.
1.
Click on the “Row #1 Name” cell and change the text color to gray.
2.
Click on the products “Total” cell and change the text color to gray.
3.
Click on the “Order_Details.UnitPrice” cell and change the text color to
gray.
The next issue with our current cross tab is sizing. Some of
the cells are getting cut off, most noticeably the products tab. You can expand
and contract individual cells to fit all elements on the screen correctly.
Figure 8: Formatted Cross Tab
Other common formatting options
·
Grid lines (Cross-Tab Expert>Customize Style>Format Grid
Lines)
·
Suppressing Empty Columns and Rows (Cross-Tab Expert>Customize
Style)
·
Group Date by Quarter (Cross-Tab Expert>Cross-Tab>Group
Options>Column will be printed)
·
Group Ordering (Cross-Tab Expert>Cross-Tab>Group Options)