How to set the page size in code?
Dear all,
How can i set the page size in code?It's not work by follow scripts:
FastReport.Report fastReport = new FastReport.Report();
...
fastReport.PrintSettings.Printer = "<My printer>";
fastReport.PrintSettings.Copies = 2;
fastReport.Pages[0].Page.Height = 8;
fastReport.Pages[0].Page.Width = 10;
fastReport.PrintSettings.ShowDialog = false;
fastReport.Print();
Regards!!!
How can i set the page size in code?It's not work by follow scripts:
FastReport.Report fastReport = new FastReport.Report();
...
fastReport.PrintSettings.Printer = "<My printer>";
fastReport.PrintSettings.Copies = 2;
fastReport.Pages[0].Page.Height = 8;
fastReport.Pages[0].Page.Width = 10;
fastReport.PrintSettings.ShowDialog = false;
fastReport.Print();
Regards!!!
Comments
using (Report report = new Report())
{
report.Load("C:\\.......frx");
FastReport.ReportPage page = new ReportPage();
page = (FastReport.ReportPage)report.Pages[0];
page.TopMargin = float.Parse(TBTop.Text);
page.LeftMargin = float.Parse(TBLeft.Text);
report.Prepare();
}