This topic uses "Custom Paper Size" report to demonstrate how you can specify custom size of paper for a report.
C1FlexReport allows you to specify the paper size using PaperSize property and orientation using the Orientation property. When you specify these properties, C1FlexReport checks if the selected paper size is available on the current printer before rendering, and changes to the default paper size if the selected setting is not available.
If you want to specify a certain paper size and use it regardless of the printers available, set the PaperSize property to Custom, and set the Layout.CustomWidth and Layout.CustomHeight properties to the page dimensions (in twips). In this report, the CustomWidth is set to 12240 and CustomHeight to 36000 to create a custom paper size (8.5 x 25 inches). Perform the following steps to see how this can be done.
SELECT Categories.*, Products.*
FROM Categories INNER JOIN Products
ON Categories.CategoryID = Products.CategoryID
Property | Value |
---|---|
GroupBy | CategoryName |
Keep Together | KeepWholeGroup |
Sort | Ascending |
ShowGroupFooter | True |
ShowGroupHeader | True |
OutlineLabel | =CategoryName |
Property | Value |
---|---|
Image.Picture | Picture |
Image.PictureAlign | Scale |
Image.PictureScale | Scale |
TextField1.Text | =CategoryName |
TextField2.Text | =Description |
Property | Value |
---|---|
TextField8.Text | =ProductName |
TextField9.Text | =QuantityPerUnit |
TextField10.Text | =UnitPrice |
TextField11.Text | =UnitsInStock |
TextField12.Text | =UnitsOnOrder |
Property | Value |
---|---|
CustomHeight | 36000 |
CustomWidth | 12240 |
Width | 10800 |
MarginBottom | 720 |
MarginLeft | 720 |
MarginRight | 720 |
MarginTop | 720 |
When specified this way, the custom paper size is used regardless of what printers are installed and what paper sizes are actually available.
Preview the report with according to the set custom paper size.
Back to Top