If you would like to upgrade to a newer long-term support version of Studio Pro, see Moving from Mendix Studio Pro 8 to 9.
Report Grid
Introduction
A Report grid shows data retrieved from the database using a Data set in a grid format. Each row in the grid displays a single result from the data set. Each time a report is created, the data is retrieved from the database.
The difference between a data grid and a report grid is that you can use a data grid to edit the data shown. A report grid will only display data. However, in a report grid, you can create additional information by merging and processing attributes when you define the data set which retrieves the data.
The report grid is displayed in Structure mode with the data set source shown between square brackets and colored blue. The data fields returned by the data set are shown in the report grid columns, under the column captions. See Report Grid Column Data Source for information on how to assign a data field to a column.
Report Grid Properties
An example of report grid properties is represented in the image below:
Report grid properties consist of the following sections:
Each column in a report grid also has properties: see Report Grid Column Properties, below.
Common Section
Data Source Section
Data Set
Data set specifies the Data set which defines the data that will be shown in the report grid. Any of the selected attributes or aggregations (for example totals or averages) from the data set can be dragged into a data grid column from the Connector pane: see Report Grid Column Data Source, below.
Design Properties Section
General Section
Use Paging
Set Use paging to Yes if you expect more data than you can display on one page. This splits the results into several pages.
Page Size
Page size specifies the number of results which are displayed on one page if Use paging is yes.
Zoom
Zoom specifies a page which will be displayed when the end-user double-clicks a result in the report.
If the selected page contains a report, the columns of the current report can be mapped to the parameters of the data set which is the basis of the report in the other page.
Column Widths
The widths of the columns are expressed as a percentage of the total width of the basic report. You can edit this property in two ways:
-
by dragging the border between the columns:
-
by entering the percentages explicitly
Each column in a report grid also has properties: see Report Grid Column Properties, below.
The data source for each column can be dragged into the column from the Connector pane: see Report Grid Column Data Source, below.
Show Export Button
Set Show export button to Yes to display the Export to Excel button to the end-user on the report grid.
When the end-user clicks this button, the report is exported as a Microsoft Excel 97-2003 Worksheet
which the end-user can download or view, depending on their browser’s settings.
Generate on Page Load
If Generate on page load is set to No, the report grid will not show any data until the end-user presses the Generate report button. This is especially useful if the report uses parameters that should first be specified by the end-user.
Report Grid Column Properties
An example of report grid properties is represented in the image below:
Report grid properties consist of a single section, General.
General Section
Caption
Caption contains the text which appears at the top of each column of the report grid.
Alignment
Alignment sets the alignment of the caption and data displayed in this column. The values are:
- Left
- Center
- Right
Format
Format allows you to convert a numeric value in the column to a month or day name. If the value in the column is not a number, Default format will be used.
The possible values are:
- Default – the data will be displayed in the default string format
- Month name – a numeric value will be interpreted as a month name (for example 8 is displayed as August)
- Weekday name – a numeric value will be interpreted as a day of the week (for example 4 is displayed as Wednesday)
Visible
If Visible is set to No then this column will not be displayed in the report.
This can be used to add a value to the report which can be passed to a report on a page specified with Zoom without displaying it as part of the report.
Report Grid Column Data Source
To add data to a column, select the column, open the Connector pane, and drag one of the results into the column. You will need to select the report grid, or part of it, to see the results of the data set in the connector pane.