Symptom
- How to format a report with multiple columns?
- How to display the data in multiple columns on a report in Crystal Reports?
- How to format a report to display 10 records per columns on a report in Crystal Reports?
Environment
- SAP Crystal Reports 2013
- SAP Crystal Reports 2016
- SAP Crystal Reports 2020
Resolution
- To format a report with multiple columns, check the Details section option: "Format with Multiple Columns", and set the Layout for the column width:
- In Crystal Reports, open a report to be formatted with multiple columns.
- Add at least 1 database fields in the Details section.
- Under the menu "Report", select: "Section Expert..."
- In "Section Expert", in the list of sections, select "Details"
- On the right side, under the tab "Common", check the option: "Format with Multiple Columns"
- Under the tab "Layout", set the Details Size Width.
( For example for an 8 x 10 inch paper size, set the width to: 4 inch, to have 2 columns. )
- Still under the tab "Layout", set the option "Printing Direction" to: "Down then Across"
- Click "OK"
Now, when previewing the report, it will display the data in multiple columns. -
To specifically have exactly X number of records per column, resize the height of the Details section to be larger, or smaller, to fit 5 records for one columns. Another option will be to add a second Details section, and conditionnaly format it to print at the bottom of the page after X number of records, to force printing the next record in the next column, or next page, by following the steps below:
- Under the menu "Report", select: "Section Expert..."
- In "Section Expert", in the list of sections, select "Details"
- Add new Details section by clicking the button "Insert"
- Select the second Details section, called: Details b
- On the right side, under the tab "Common", click on the "X-2" button for the option: "Print at Bottom of Page"
- In the Formula Workshop, enter a formula that will conditionally print Details section b at the bottom of the page after X number of records. For example, to have 5 records per column, enter a formula like:
If Remainder(recordnumber,5) = 0 Then true else false
- In the upper left corner, click on "Save and close"
- Back to the Section Expert, click "OK"
- In the Design view of the report, resize the height of the Details b, section to be small.
- Save your report.
- Sample report demonstrating the above is available in the Attachments section under the name: Multiple_Columns.rpt
Keywords
CR, multi-columns , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , How To
Product
SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020
Attachments
Multiple_columns.rpt |