Skip to main content Skip to footer

MultiColumn Layout in C1Reports

Displaying data through newspaper columns is always a preferred practice in any Reporting service. It not only presents the focused and salient content but also makes the reports look more professional. ComponentOne Reports for WinForms provides us with features for creating Columnar Reports. MultiColumn Basically, Reports for WinForms provides two distinctly different methods for generating reports:

  • Using the C1Report component
  • Using C1PrintDocument

In this article, we will be discussing creating Columnar Reports using both of the above mentioned components.

Using C1Reports

MultiColumn layout reports can be directly created using the Columns and ColumnLayout properties of the Layout class in C1Reports. Columns property defines the number of Detail columns whereas ColumnLayout property is used to decide the direction of subsequent data in columns (Down/Across).

Layout l = _c1rReport.Layout;  
l.Columns = 2;  
l.ColumnLayout = ColumnLayoutEnum.Down;  

Using C1PrintDocument

In order to create Columnar Reports using C1PrintDocument, one needs to manually add the columns (of type C1.C1Preview.PageColumnDef) to Columns collection of PageLayout class. Now, Spacing and Width properties of PageColumnDef class can be used to define the spacing between the current and the next columns.

C1.C1Preview.PageColumnDef _pcdCol1 = new PageColumnDef("13cm", "1cm");  
C1.C1Preview.PageColumnDef _pcdCol2 = new PageColumnDef("13cm", "0cm");  

Any comments or suggestions are most welcome :) Download Sample- C# Download Sample - VB


comments powered by Disqus