Click here to Skip to main content
14,391,825 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi I have a Reportviewer control on my VB.NET Form, to view/print an rdl file. How can i set the page size and margin settings programmatically before printing the report ?.. Now everytime i have to set the margins at print time.. Is there any simple solution in VB.Net ?
Updated 30-Mar-17 8:46am
Member 12570679 28-Sep-17 0:51am
this is not solution

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Try this ...

Dim newPageSettings As New System.Drawing.Printing.PageSettings
newPageSettings.Margins = New System.Drawing.Printing.Margins(40, 20, 20, 20)
Member 12570679 28-Sep-17 0:52am
Not working setpagesetting error

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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100