How to use plugin PDF Reporting

PDF Reporting plugin helps you to generate reports. This tutorial shows you how to generate reports in PDF format on button click. In our example we will create an action that will generate report of products on products search page.

PDF file

1. Login into developer panel.

2. Before you can use plugin you need to install it. Navigate to Plugins > Menage plugins. Click on FIND NEW PLUGIN. Select plugin and than click on Install buton.

Find new plugin

3. After you installed plugin PDF Reporting, navigate to Plugins > Reports. On this page you can add reports that you will use in application. Click on Add report button and enter report name, choose report template file type and click on button Next.

report template

4. Report template type is file format of your report template. This file can be text document saved in the OpenDocument format as flat XML file (.FODT) or HTML code. Report template should cantains variables that will be replaced with values in proccess generate report (i.e. {Data source name.Column name}).  If you choose FODT format, you can upload your template on next form.


FODT editing

If you choose HTML format, you can edit HTML template by clicking on button Edit template on next form.

html editor report template

5. Select new report and click on Edit report. Click on button Add report parameter. In our example we use only product category id parameter, so enter parameter name and click on Save report parameter button.

PDF New param

6. Click on Add report data source button. Enter report Data source name that will be used in report file, select Data soruce type and enter Data soruce code. You can use report parameters in Data source code. Click on Save Report data source.

PDF Data source

7.  Add one more report data source for parameter table and click on Save report.

Parameter data source type

8. Navigate to Pages menu item.

9. Select page pageProductsSerach.

10. Drag and drop Action component to button ButtonGeneratePDFReport.

11. Select Server function as Action type.

PDF Report action

12. Click on text area under Action code label. Select PDF Reporting plugin and select GenerateReport function. Enter report name Products and drag and drop form component {SingleselectSearchProductCategory2} from the left side to parameter1 field on the right side. Click on Save button.

Server function

13. Click on Save changes button and go into your application and check out the results.