ActiveReports 8 > ActiveReports User Guide > Samples and Walkthroughs > Walkthroughs > Page Report Walkthroughs > Layout > Columnar Layout Reports (CPL) |
In CPL reports, you can create a columnar report layout by using the Columns property of the report. This walkthrough illustrates how to create a CPL report using columns, and is split up into the following activities:
Note: This walkthrough uses the CustomerMailingList table from the Reels database. By default, in ActiveReports, the Reels.mdb file is located in the [User Documents folder]\ComponentOne Samples\ActiveReports 8\Data folder. |
When you complete this walkthrough you get a layout that looks similar to the following at design time and at runtime.
To add an ActiveReport to the Visual Studio project
See Adding an ActiveReport to a Project for information on adding different report layouts.
To connect the report to a data source
To add a dataset
SQL Query |
Copy Code
|
---|---|
SELECT TOP 100 * FROM CustomerMailingList
UNION
SELECT TOP 100 * FROM CustomerMailingList WHERE Country = "USA"
ORDER BY 8 DESC
|
To create a column layout for the report
Property Name | Property Value |
---|---|
Columns | 2 |
ColumnSpacing | 0.25in |
Size | 2.625in, 1in |
Property Name | Property Value |
---|---|
DataSetName | CustomerList |
Size | 2.5in, 1in |
Property Name | Property Value |
---|---|
Location | 0in, 0in |
Size | 2.5in, 0.25in |
DataElementName | FirstName |
Name | FirstName |
Value | =Fields!FirstName.Value & IIF( Fields!MiddleInitial.Value Is Nothing, "", " " & Fields!MiddleInitial.Value ) & " " & Fields!LastName.Value |
CanGrow | False |
Property Name | Property Value |
---|---|
Location | 0in, 0.25in |
Size | 2.5in, 0.25in |
DataElementName | CustomerAddress1 |
Name | CustomerAddress1 |
Value | =Fields!Address1.Value & IIF( Fields!Address2.Value is Nothing, "", vbCrLf & Fields!Address2.Value ) |
CanGrow | False |
CanShrink | True |
Property Name | Property Value |
---|---|
Location | 0in, 0.50in |
Size | 2.5in, 0.25in |
DataElementName | CustomerCity |
Name | CustomerCity |
Value | =Fields!City.Value & ", " & Fields!Region.Value & " " & Fields!PostalCode.Value & " " & IIf( Fields!Country.Value = "USA", "", Fields!Country.Value ) |
CanGrow | False |
To view the report
OR