Handle Events About Report Runtime Filter ValuesLast Updated: 07/29/2016 Introduced in Verision: 2.0
This tutorial demonstrates how to use Embedded Form to handle Report Runtime Filters.
For this example we are going to 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 Data 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 click Create 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 the Designer 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.
Flow Wizard 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 a Label, 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…
Input Data for our Form should look like this:
This completes our Form and we can Save and close it to return back to our Flow Designer. Then, we are using Flow Wizard’s 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 add Report 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 click Create Page/Dashboard 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.
Then, we add another Report Viewer component and select our Registered Sessions Report as Default Report for this Viewer.
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. In order to do it we need to select Manage > Page > Display Existing Page option for our Designer Folder.
In the resulting popup window we Name our new View and pick our Page.
When finished, we can click Ok to save and close this popup window.
Mention, that a new link for our view appears on the top panel in our Designer Folder. We can click it to test the results of this tutorial.
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.
We input some value into Runtime Filter on the Parent Report and observe that both Reports are being filtered using the same value.
We edit our input and observe that both Reports are being changed…
Finally, we use our Embedded 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 our Parent 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 the Embedded Form.