How to open "Page Setup" Dialog Programmatically.

In the Fast report preview window, in the toolbar, there is a button to open a "Page Setup" dialog to edit the page setup settings for the report that is being previewed.

Is it possible to open this dialog programmatically and without using the preview window. i.e. can I put button in my program's user interface that they can press and have my program open the page setup dialog for a report that I specify and that is not being previewed?

Comments

  • Hello!

    Yes, you can open the Page Setup dialogue programmematically directly from your UI without launching the Preview window! To do this, the ReportPage object itself in FastReport .NET (WinForms) has a public method called InvokeEditor():

    var page = report.Pages[0] as FastReport.ReportPage;
    if (page != null && page.InvokeEditor())
    {
    // The user has changed the paper size, margins or orientation and clicked OK:
    report.Prepare();
    }
    

    Inside InvokeEditor(), the standard PageSetupForm is opened; if the user has clicked OK (true), call report.Prepare() to recalculate the pages with the new margins/paper size.

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.