Create a button that generates the report

Generate a PDF report with a press of a button.

Prerequisites

Configure the report footer.

To create a button that generates the report
  1. Create the button:
    1. In Project view, right-click MainWindow (type), and select New > Base controls > Button.
    2. Hover-over the button, select Edit, and enter GenerateReportButton.
    3. In Properties, set Text to Generate Report.
  2. Configure the button:
    1. In Events, next to MouseClick event, select Add and select ProjectName > Reports > Reports1 > GeneratePdf
    2. Under Method arguments, set the OutputPath property value.

      Enter the file path where you want to save the report.

      For example, enter: C:\Users\user_name\Documents\Reports\Report.pdf

      user_name
      Your Windows user name. For example, JohnDoe