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.

Comments

  • LurkingKiwiLurkingKiwi Wellington, New Zealand
    edited 3:11AM
    I know it's been a while, but I use the following code for changing paper size in one of my projects. Perhaps the SelectPrinter should go before assigning PaperSize, which may make the SetView Params unnecessary...
    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);

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.