Details Report
The Details Report is an extension function for the Table Grid visual that allows the user the ability to define a detailed ‘child report’ component that can be expanded to show additional rows of information relating to the parent row. This can be useful when you would like to present data that behaves in a “Header / Row” paradigm, e.g. an Invoice with multiple Line Items.
As displayed in the image above, the parent table has expansion capabilities, and when expanded, displays a detailed query. The values from the row expanded in the parent table are passed through as filter values to the detailed query. In the example, the G/L Account Code and Year/Period are passed to the detailed report which shows the corresponding transactions.
How to Create
Create a published query to act as the parent table. Take note of the output names. In the example below, the output names to keep track of are “GLAccCod” and “YeaPerCod”.
Create another published query to act as the detailed report. You must include filters that correspond with the values you would like to be passed through from the parent table. In this example, there are 2 filters, a G/L Account Code and a Year/Period Code, which correspond with the outputs from the parent query.
It is very important that you make sure that the output names from the parent query and the filter names from the detailed query match.
If you are using a number output as a pass-through filter (e.g. an Account Number or similar), you will need to ensure that the “Total” option for the output is set to ‘None’.
Go back to the parent published report. Under the Options tab, make sure that the type is set to Table Grid. Then go to the Table tab, check the box next to Details Report and select the Details Published Query from the lookup provided.
Editing/Writeback Data
In a database, a header table can have joins to detailed tables. The Details Report is a feature that displays this relationship. Sharperlight also has a feature that relates to the editing/writeback of data into these tables.
The image shown below is a very simple example of this feature. In the Grid Edit mode of the header table, there are expansion icons next to each record. When expanded, the Grid Edit mode for the Details table is shown as well. Therefore, both tables can be edited on the same page, simplifying the editing process.
How to Create
There are two different ways to implement this feature:
- In Foundry, identify the header and detail tables. In the header table, make a join to the details table and tick the Show in Grid Edit checkbox.
- If the datamodel has already been created or the user does not intend to use Foundry, open up the datamodel in Studio. Navigate to the header table, right click in the field’s section and create a join to the details table. On the right, under the Attributes section, type “<WritebackTableDetails>” into the Comments area.
