Using Report feature you can create canned and adhoc reports over data from a datasource. The datasource can be a database or a REST web service. Refer Creating Data Connections for information on creating a datasource.
Info | ||
---|---|---|
| ||
To create reports, you must have already created database or webservice connection and datasource to fetch application data. Refer Creating Data Connections for more information on creating connection and datasource. |
...
To create reports, perform the following steps in Canvas Studio:
- Click Create > Report.
The Information Report page appears. - In the Report Maintenance tab, enter :
- Enter a unique ID for the report in the Report Id field.
- Enter a display name for the report in the Report Name field.
- Click the Data Source Name field and select a datasource. Refer Creating Data Connections to create a database or webservice connection and datasource.
Click the Select Columns to Display field and select the columns for the report.
Info When generating reports in the application, end users will be able to select only the columns selected here for the report. Similarly, the following fields behave in the same manner - Select Groupable Columns, Select Sortable
Columns
The Template Config page appears with the list of columns from the selected datasource on the left-hand side of the page.- By default, in the Template Config page, a section with single-column (stack) layout is displayed. To change the layout, click the respective column icons. You can change the layout from single-column (stack) to six-columns.
- Drag and drop the columns into the section.
- If you want to add additional sections in the group header
click Add Section and drag and drop the required columns into that section.Click Save () icon to save the group header changes and go back to Report Maintenance tab.,
and
Select Filterable Columns
.
Click the Select Allowed Formats field and select the formats in which the report can be generated. The following formats are supported: CSV, DOCX, HTML, PDF,
XLS, and
The following screen shot shows sample data for the report generation:
Click SubmitInfo The sample data shown on the screen shot relates to a Sales Order Report for which data is retrieved from a datasource. The Sales Order report will display the order details, such as Order ID, Order Date, Customer ID, Product ID, Product Name, Quantity, Price, and Sales Amount. The report will be generated in HTML and PDF formats.
Notice that the column names from the datasource contain underscores (e.g. Order_ID). Hence, a resource bundle called 'common' is used. This is a property file that contains the exact labels for each column name that you provided by clicking Add Labels. When the Sales Order report is generated, the column names will be replaced with the labels from the resource bundle.
XML.
Note End users can generate reports in the application in the formats configured in the Select Allowed Formats field. For example, if CSV and HTML are selected for a report, end users can generate reports in the application in CSV and HTML formats only.
The Resource Bundle Entries page appears. By default, English language is selected in the Language drop-down list. You can select any other language for your application from the Language drop-down list.
Enter the labels (captions) for each of the report headers in their respective fields and click Save.
A confirmation message appears. Click OK for the message.
Select the template for the report from the Select Report Template drop-down list. By default, CANVAS_DEFAULT is available as the template.
Select the font for the report from the Select Font drop-down list.
- Click the Select Filterable Columns field and select the column(s) by which the report results are to be filtered.
- Click the Select Groupable Columns field and select the column(s) by which the report results are to be grouped.
- Click the Select Sortable Columns field and select the column(s) by which the report results are to be sorted.
- Click Save.
A confirmation message appears. Click OK for the message.
Info The new report is made available for the end users in the Information Reports workspace in the end application.
...