Handle Events About Report Runtime Filter Values
- Updated on 04 Dec 2014
- 6 minutes to read
This tutorial demonstrates how to use anEmbedded Form to handle Report Runtime Filters .
We will create two Reports , a Flow with a Form , and a Page to display these elements.
First, we need to create Reports . We begin in the Designer Folder. Click Create Report > Create Report from Folder Actions panel.
We name our Report and click Create to proceed to the Report Designer.
In the Report Designer in the ToolBox we expand Data Source category and add Registered Sessions Events data source from Infrastructure subcategory.
Next, we add desired columns to our Report from selected Data Source. Here we added EventSession, EventId, LastEventFetch, and LastPing columns. Also, we group our Report by EventSession field.
Then, we need to add Filter to our Report . We expand Filters > Field Filters > Eventsession category in the ToolBox and add EventSession Contains filter to our Report .
With our Filter selected we navigate to its Properties . We select Runtime Editable option from Runtime Behavior dropdown list. This is going to be our “Parent” Report that will be accepting Filter inputs from the user at runtime and then share these values with other Report .
Next, in our Filter Properties we check Show all data when filter value empty checkbox in order to see Report data when there is no input in our Filter.
In our Report Properties locate Results settings and click Add New link to add new Sub Totals for the Report .
In the Add Subtotals popup window we pick EventSession from Field dropdown list. In this case our Subtotals will be counted basing on this field. When finished we can click Ok to save and close this popup window.
Next, we Add Matrix view to our Report .
In the Matrix view we Add Field Dimension ...
Next, we pick EventSession as our Field Dimension ...
This completes our first Report . We can Save and close it to return back to our Designer Folder.
In the Designer Folder we clickCreate Report just like we did to create first Report . Similarly, we Name our second Report and click Create to proceed to the Report Designer.
This time we add Get All Sessions data source to our Report from Data Source > Infrastructure category.
Next, we add columns to our Report from selected Data Source . Here, we added all possible columns from Get All Sessions data source.
Then, we add Client Event Session Contains filter from Data Filters > Field Filters > Clienteventsession category in the ToolBox .
With our Filter selected we locate its Properties . This is going to be “Child” Report . In order to receive values from the*“Parent”* Report filter we need to set couple things:
First, we need to change this filter's name to be the same as the name of the filter on the Parent Report. In this case Filter Name should be changed to EventSession Contains.
Second, Runtime Behavior should be changed to Get Values From Other Reports.
Again, we check Show all data when filter value empty checkbox to be able to see Report data when there is no input for the Filter .
Next, we add Matrix view to this Report . Here, it reflects Client Event Session field as Dimension Field.
This completes our second Report . When finished we can Save and close Report to return back to our Designer Folder.
In theDesigner Folder we click Create Flow to create a Flow for our Reports .
We name the Flow and click Create to proceed to the Flow Designer.
Quick Add Step dialog shows up on the workspace in the Flow Designer . We expand Flows, Rules, Forms and Reports > Forms[Interaction] category and select [Pick or Create Form] step. Click Add to add this step to our Flow .
In the next popup window we click Pick or Create Form link.
Next, we Name our Form and click Create to proceed to the Form Designer.
Our Form designed as follows. It has aLabel, TextBox and Button .
TextBox Properties should be configured as following...
Additionally, we need to add a Form Input data of type String and named EventSession Contains .
This completes our Form and we can Save and close it to return back to our Flow Designer. Then, we are using Quick Add Step dialog search bar to locate Set Report Parameters step. We add this step to our Flow .
Next, we can connect steps in our Flow as following, and delete End Step because we are not going to need it in this Example .
For the Set Report Parameters Step we locate Data Definitions configuration and click Add New to addReport Parameters.
We Name our Report Parameter EventSession Contains and provide its type String .
Check Can Be Null checkbox. Our Report Parameter should look like following. When finished, we can click Ok to save and close this popup window.
On the workspace we click Show Mapping Editor for our Set Report Parameters step.
In the Mapping Editor we connect EventSession Contains outcome from our Form to EventSession Contains in this step. For FolderId field we select Constant type of mapping.
In order to get FolderId we need to select Manage > Get Designer Project ID in our Designer Folder.
Next, we can copy FolderId from the resulting popup window...
And past it into FolderId field in the Mapping Editor for our Set Report Parameters Step in our Flow .
This completes our Flow . We can Save and close it to return back to our Designer Folder.
Now we need to create Page to display all components we have created in this tutorial. In the Designer Folder we select All > Manage > Page > Add Page on Folder Actions panel.
Next, we name our Page and click Create to proceed to the Page Designer.
In the Page Designer we add Report Viewer and select our Registered Events Report as Default Report for the Viewer .
Next, we add Flow Run At component and select our Set Report Filters Flow as a source for this component.
Next, we add Matrix component to our Page and select Registered Sessions Report as a source for this component.
This completes our Page design. We can Save and close Page Designer to return back to our Designer Folder.
In the Designer Folder we can create a new View using the Page we have just created.
We can observe that our Reports are displayed. One Report has Runtime Editable Filter. As well we can see our Embedded Form that can accept user inputs and send them to our Reports' Filters.
Finally, we use ourEmbedded Form to input a value that should be used by our Reports . When we press Button on the Form the value is being sent to ourParent Report and we can confirm it by observing its Runtime Filter (the value from the Form should appear in the Runtime Filter input box). As we know our Parent Report shares its Filter values with second Report ... As a result, both Reports are Filtered by the value that was sent from theEmbedded Form.