Dear All,
I have a crystal report in windows application. So I have this one crystal report where I am trying to change page size via right click then select Design and Print Setup. I am trying many different page size but it doesnt change and remain back to letter size . Why this happen ya any idea? Thank you.
Loading
ss ssPosted Oct 5, 2009, 12:15 PM
Is there any solutions ? Thank you.
ss ssPosted Oct 3, 2009, 1:42 PM
For now I have this settings in my coding. I would like to ask when printing will the paperorientation follow this one or the one I set on printer driver itself ? I saw you code but you put the extra thing is the margin settings right will that help in the page length or width is it ?
myReport.SetDataSource(dsReceipt1);
myReport.PrintOptions.PrinterName = "myPrinter";
myReport.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait;
myReport.PrintToPrinter(1, false, 0, 0);
Master BillaPosted Oct 3, 2009, 1:21 AM
We can do this in code levell.
here code for you
using CrystalDecisions.Shared;
private void SetupMe()
{
PageMargins PM = new PageMargins();
PM = rptsr.PrintOptions.PageMargins;
PM.topMargin = 300;
rptsr.PrintOptions.ApplyPageMargins(PM);
rptsr.PrintToPrinter(1, false, 1, 1);
}
thank you