Detecting when the Paper Size changes

In my report, I'm creating all the bands, the memo views and the data programmatically.
The user can add and remove the columns that get displayed in the report from within the application.

Sometimes there are more columns that would fit on an A4 page so after the preview is displayed,
the user changes the paper size from the "Page Settings" Dialog to A3.

But when this happens, the data does not stretch to fill the new paper size.
How do I detect that the paper size has changed so that I can redraw the bands correctly?

Comments

  • gpigpi
    edited 6:11PM
    Try to check TfrxReportPage(frxReport1.FindObject('Page1')).PaperSize in the TfrxReport.OnBeginDoc event
  • edited 6:11PM
    gpi wrote: »
    Try to check TfrxReportPage(frxReport1.FindObject('Page1')).PaperSize in the TfrxReport.OnBeginDoc event


    It doesn't look like "OnBeginDoc" gets called when the page size is changed from the "Page Settings" dialog, what else can I try?
  • gpigpi
    edited 6:11PM
    OnBeginDoc called when "Apply to all pages" option selected. It rebuild report. "Apply to the current page" option just change page size, orientation and margins
  • edited 6:11PM
    gpi wrote: »
    OnBeginDoc called when "Apply to all pages" option selected. It rebuild report. "Apply to the current page" option just change page size, orientation and margins

    When I select "Apply to all pages" and then click the "OK" button on the Page Settings dialog, I get this error message: "Dataset "" does not exist".
    Any idea why this is happening?


  • gpigpi
    edited 6:11PM
    No any idea without test project with error. Attach test project here or send it to support@fast-report.com

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.