Set Paper Orientation and Paper Size
By default, the C1Report and C1WebReport controls use the default paper size on the default printer. If you select a paper size that is not available on the current printer, C1Report and C1WebReport will revert to the current paper size. Note that C1Report and C1WebReport will use 8.5x11 inches if there's no printer installed.
To overcome this and use whatever paper size you want regardless of installed printers, you should set the Layout.CustomWidth and Layout.CustomHeight properties to the page dimensions you want (expressed in twips). For example:
' Force the paper size to Legal
Me.C1WebReport1.Report.Layout.PaperSize = PaperKind.Custom
Me.C1WebReport1.Report.Layout.CustomWidth = 612 * 20
Me.C1WebReport1.Report.Layout.CustomHeight = 1008 * 20
• C#
// Force the paper size to Legal
this.c1WebReport1.Report.Layout.PaperSize = PaperKind.Custom;
this.c1WebReport1.Report.Layout.CustomWidth = 612 * 20;
this.c1WebReport1.Report.Layout.CustomHeight = 1008 * 20;
Remember to set these properties after you load the report definition, otherwise the settings stored with the report definition will take precedence.
|