RENATO ALMEIDA DE OLIVEIRA

UIM CABI Portlet Dynamic Filters

Blog Post created by RENATO ALMEIDA DE OLIVEIRA on May 7, 2018

WHAT WE'RE GOING TO DO:

      In this tutorial i'm gonna teach hoje to use dynamic filters on your custom dashboard.

ENVIRONMENT:

  • UIM 8.5
  • Cabi_External probe
  • JasperServer 6.3

RECOMMENDED READING:

  1. Playing with JasperReports - Part 1 Input Controls 
  2. UIM CABI Interactive dashboard 

STEPS:

   The utilization of dynamic filters require: the creation of an input control explained on reading 1, the inclusion of a parameter with same name of the input control on the dashboard, witch can be seen on Reading 2, and the configuration of the dynamic filters field.

  1.  Following the steps of reading 1, create an input control named Tpar1, with a list of values chosen only by simplicity, on real scenarios it could be anything;
  2. Follow the steps of reading 2 to create the dashboard, and add to the filters the parameter Tpar1;
  3. With the destiny report configure the parameter Tpar1 to receive the inputcontrol  created on 1
  4. On CABI Portlet Preferences edit Dynamic Filters as explained bellow:

 

The syntax of the DynamicFilter is : [{'reportPath': '<path to the target report>' , 'controlId' : 'parameter name' , 'dashFilter': 'filter name' , 'displayName': 'filter display name'}, {'reportPath': '<path to the target report1>' , 'controlId' : 'parameter name1' , 'dashFilter': 'filter name1' , 'displayName': 'filter display name1'}  .... ] 

The SecurityUtils.js doesn't parse the input, so its MANDATORY the use of  instead of " on the object parameter defenitions

    5. So on your example there will be only one filter so: the path to target is: /public/UIM/Destino , the controlId is : Tpar1 , the dashFilter is: Tpar1, and the displayName is: Parameter example, so the DisplayFilter will be:

[{'reportPath': '/public/UIM/Destino' , 'controlId' : 'Tpar1' , 'dashFilter': 'Tpar1' , 'displayName': 'Parameter example'}   ] 

 

After saved the result will be:

 

And that's all. Thank you for your time, and if there are any doubts please fell free to ask.

Outcomes