Hi:
Can you tell me how I might use the class Stimulsoft.Report.StiResizeReportHelper.ResizeReport(...) to resize a report before printing it?
My aim is to resize a report from A4 to A5 paper and print it; without changing the report template. I know the Windows Viewer supports scaling, but what about scaling when I send my report directly to the printer?
Thanks,
Martin.
StiResizeReportHelper.ResizeReport
-
- Posts: 66
- Joined: Wed Apr 04, 2007 3:32 am
- Location: Spain
StiResizeReportHelper.ResizeReport
Hello,
Please try to use the following code, for example:
Thank you.
Please try to use the following code, for example:
Code: Select all
StiReport stiReport = new StiReport();
stiReport.Load(@"d:\SimpleList.mrt");
stiReport.Render();
PaperSize newSize = new PaperSize("A5", 583, 827);
newSize.RawKind = (int)PaperKind.A5;
StiResizeReportHelper.ResizeReport(stiReport,
StiPageOrientation.Portrait,
newSize.Kind,
stiReport.Pages[0].Margins,
stiReport.Unit.ConvertFromHInches(newSize.Width),
stiReport.Unit.ConvertFromHInches(newSize.Height),
StiResizeReportOptions.RescaleContent | StiResizeReportOptions.ProcessAllPages,
0);
stiReport.Print();
-
- Posts: 66
- Joined: Wed Apr 04, 2007 3:32 am
- Location: Spain
StiResizeReportHelper.ResizeReport
Ivan:
Truly amazing! This has saved me many, many hours of work.
Thanks very much, regards,
Martin.
Truly amazing! This has saved me many, many hours of work.
Thanks very much, regards,
Martin.
StiResizeReportHelper.ResizeReport
Hello,
Great! Have a nice weekend!
Great! Have a nice weekend!