I built a report with a landscape orientation using VB.net 2010 and made the size 16.5 cm * 8.25 cm
When you print the report directly shows the size of the page A4 !!!
I need to provide the printer with a custom paper size. How can I make my report have a custom paper size?
Link: http://www.uploadmb.com/dw.php?id=1379145264
In order to change the default format (A4) of a report, you must change the report properties to accept a custom paper size.
Step 1
Open your report and right click (on the gray pane, not the report itself) to select "Report Properties"
Step 2
Choose Landscape for your orientation and select a custom paper size. Specify your width and height as well.
Here is the code I used to programmatically set a custom paper size to my report
ReportViewer1.PrinterSettings.DefaultPageSettings.PaperSize = new PaperSize("Custom", 650, 325)
**Note: Don't forget, you may need to use the code ReportViewer1.RefreshReport()
if it doesn't work.*
For more information, visit MSDN's PaperSettings.PaperSize page
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With