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.