[]
        
(Showing Draft Content)

Preview and Print Reports

After designing the report, you may like to Preview the report and may also wish to take a Print of the report. Both the tasks can be accomplished by a few button clicks.

When you create a new report or open an existing report in the designer, the report is displayed in the Design mode.

For previewing the report, click Preview button or press shortcut key F5. For printing the report, go to the File menu and click Print or press shortcut keys Ctrl+P. Note that the Print option is enabled only in Preview mode. The Print dialog box lets you specify the settings on the printer.

Print preview dialog

You can also edit the page settings through the options available in the Page Layout group.

In Code

After creating a report, you may want to print it. This can be accomplished using Print method of C1DocumentSource class. This method can be used to print the generated report.

To print a report, use the following code:

C1FlexReport rep = new C1FlexReport();
rep.Load(@"..\..\Products Report.flxr", "Products Report");
rep.Render();
rep.Print();