how to manage page size and margin in crystal report?

69,010

Solution 1

If you use Crystal Reports to design your report, Page size and Margins can be edited by Page Setup. Right Click on your report select Page Setup. You'll get a window as shown below.

Page Setup in Crystal Report
Here you can edit the page size and margins...

If you use VS2010 to design your report, follow the below steps

Printer Setup
enter image description here

For Margins Open Page Setup

enter image description here

Hope this helps !!

Solution 2

And to change them programmatically:

        yourReportObject.PrintOptions.PaperSize = CrystalDecisions.Shared.PaperSize.PaperA4;
        yourReportObject.PrintOptions.ApplyPageMargins(new CrystalDecisions.Shared.PageMargins(0, 0, 0, 0));
Share:
69,010
haansi
Author by

haansi

Updated on July 09, 2022

Comments

  • haansi
    haansi almost 2 years

    I am new to crystal reports and using crystal report with .Net (WinForm / Visual Studio 2010).

    I was thinking what would be the way to setup page size and top, bottom, left and right margins in report. I tried to look options but couldn't get it. Please guide me.

  • Emanuele Greco
    Emanuele Greco over 11 years
    Good answer; 'no printer' is suggested, anyway.
  • Hariharan Anbazhagan
    Hariharan Anbazhagan over 11 years
    Thx but i cant get what u say as 'no printer'
  • Emanuele Greco
    Emanuele Greco over 11 years
    Look at 'Print Setup' image; RICOH printer params are nested into the report, but final user won't have RICOH printe. So flag 'no printer' to increase report performance
  • Emanuele Greco
    Emanuele Greco over 11 years
    'Therefore, as a best practice for scalability, modify your report to use no printer driver.' read here msdn.microsoft.com/en-us/library/ms225523(v=vs.80).aspx
  • Hariharan Anbazhagan
    Hariharan Anbazhagan over 11 years
    yeah got it now ! Thq very mcuh
  • Smith
    Smith almost 8 years
    @EmanueleGreco how do you then set the size of the paper, and what papersize does crystal report defaults to the the Noprinter option