FastReport paperSize not taking any effect on changing width and height of the ReportPage
im working with Delphi and fast reports and since the app I am developing is about label printing I need to change the width and height of the report page in order to find the right sizes depending on the printer the customer has...
the thing is, I set te reportPage PaperSize to something other than personalized but it has no effect. and according to the documentation it should change the paper height and width automatically, but it isn't.
here is some code:
Page:= reportePrueba.FindObject('Page1') as TfrxReportPage;
Page.PaperSize:= frxPrinters.Printer.PaperNameToNumber(ComboPaper.Items[ComboPaper.ItemIndex]);
where page is a TfrxReportPage and I am getting the desired paper from a combobox, changing the name to number, for instance "29mm x 90mm" to 271 or something like that.
the PaperSize property does change on the report, but it has no effect at all changing the paper width and height.
any ideas on how to do that? thanks in advance! Hiram.
the thing is, I set te reportPage PaperSize to something other than personalized but it has no effect. and according to the documentation it should change the paper height and width automatically, but it isn't.
here is some code:
Page:= reportePrueba.FindObject('Page1') as TfrxReportPage;
Page.PaperSize:= frxPrinters.Printer.PaperNameToNumber(ComboPaper.Items[ComboPaper.ItemIndex]);
where page is a TfrxReportPage and I am getting the desired paper from a combobox, changing the name to number, for instance "29mm x 90mm" to 271 or something like that.
the PaperSize property does change on the report, but it has no effect at all changing the paper width and height.
any ideas on how to do that? thanks in advance! Hiram.
Comments
Anyway, it works for me for odd-sized paper.
ThePage := report.FindObject('Page1') as TfrxReportPage;
i := MyNewpaperIndex;
ThePage.PaperSize := i;
report.SelectPrinter;
frxPrinters.printer.SetViewParams(i, 999, 999, poPortrait);