SAP Knowledge Base Article - Public

1297119 - How to format a report to display multiple columns in Crystal Reports?

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:
      
    1. In Crystal Reports, open a report to be formatted with multiple columns.

    2. Add at least 1 database fields in the Details section.
        
    3. Under the menu "Report", select: "Section Expert..."
        
    4. In "Section Expert", in the list of sections, select "Details"
        
    5. On the right side, under the tab "Common", check the option: "Format with Multiple Columns"
        
    6. 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. )
        
    7. Still under the tab "Layout", set the option "Printing Direction" to: "Down then Across"
        
    8. 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:

    1. Under the menu "Report", select: "Section Expert..."
        
    2. In "Section Expert", in the list of sections, select "Details"
        
    3. Add new Details section by clicking the button "Insert"
        
    4. Select the second Details section, called: Details b
        
    5. On the right side, under the tab "Common", click on the "X-2" button for the option: "Print at Bottom of Page"
        
    6. 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
        
    7. In the upper left corner, click on "Save and close"
        
    8. Back to the Section Expert, click "OK"
       
    9. In the Design view of the report, resize the height of the Details b, section to be small.

    10. 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