Click here to Skip to main content
15,358,239 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
Crystal Report: How to change User defined page size (Horizontal and vertical) at runtime

What I have tried:

--> Visual Studio -->Crystal report --> Design --> Page Setup --> Page Options -->Horizontal to 9 inch -->Vertical to 55 inch
Updated 31-Aug-20 6:21am

DoingWork 31-Aug-20 11:44am
Links Does not include any solution. (I am able to do it by form but I want to do it by programatically)
Richard MacCutchan 31-Aug-20 11:50am
Check the documentation for CR to see what the API lets you do.
The elements are derived from Printer settings. You can change the paper size at runtime to defined sizes.

example snippet:
PrintOptions boPrintOptions = boReportDocument.PrintOptions; 

// A3
boPrintOptions.PaperSize = PaperSize.PaperA3;

// A4
boPrintOptions.PaperSize = PaperSize.PaperA4;

Try out!
DoingWork 3-Sep-20 11:37am
I know this method But I want to set Height and Width in this way.
Height = 30.00
Width = 9.5
So your solution is not my requirement. Thanks for reply
Sandeep Mewara 3-Sep-20 11:45am
AFAIK, you cannot.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900