How to pass relationship as a parameter for reportdefinition


We have a requirement to filter the table data based on user selection of equal or not equal on UI and we have to take the user selection and run report definition to fetch the data. we have almost 10 filter conditions. User may select few equal to and few not equal to.

To achieve this with single report definition, we need to pass the relationship as parameter or filter condition as parameter.

Any solution or approach to achieve this requirement is helpful using report definition.


Keep up to date on this post and subscribe to comments

October 16, 2019 - 12:52pm

Hi @MohammadS4753,

I understand that you would like to use a single report definition for all the filter columns with relationships to be dynamic. I am able to achieve that using the following away.

Please configure to use the action called "Report definition". I used on button in my sample to start with, as shown below.

The report definition has following configurations must enable to see the desired behaviour.

My Report has one filter - as shown below - click on setting icons of the filter as shown below.

Up on clicking on that icon, you should see a modal dialog with following options - Please set them as highlighted below.

That it, When clicking on a button - we see the report in the following way.

When click on Filter "Any ID" user see the below screen


When user clicks on "Apply Changes" button they see the updated data in the data grid below. Hope this is what you are looking for.

Also, Goto Data Access tab of the report and select the option as highlighted below. 

This will allow to show the filters first and then data - So when user click on button user see following screen.

Up on submit, they see data grid with filters on top. Likewise, we have options to disable Actions, exports and more on data access tab. You can explore them.

Hope this helps. Please feel free to reply for any questions.

Thank you,

Regards, Cherb.

October 17, 2019 - 3:02am
Response to cherb

Hi @cherb, Thanks for your reply, i am not expecting the user to see the report definition rule filters. lets say i have 4 UI fields and on change of each field value, we need to refresh the section below and pass the parameter to load with data from report definition. User will not select the filters from report definition page.

October 17, 2019 - 3:39pm
Response to MohammadS4753

Hi @MohammadS4753,

The best way to handle the requirement is to configure on change refresh this/other section to refresh the grid section and pass the value of the property as parameter to report definition. if the only values needs to be passed.

Instead of following OOTB way of achieving the solution, customizing the activities and maintaining the own logic seems as complex way to handle a requirement for me (to pass both relationship and value as parameters)  Follow other members suggestions already given in this thread for this approach.

Thank you,

Regards, Cherb

October 17, 2019 - 1:24am

Based on your requirement, you will have to dynamically build the filter condition. At a high level, these are the steps you need to perform using an activity.

1. Open the report definition (RD) record using Obj-Open.

2. Alter filter conditions by modifying .pyContent.pyFilters appropriately. You can look at the rule data of any existing RD to understand what properties need to be set.

3. Alter .pyContent.pyFilters.pyFilterLogic appropriately.

4. Call OOTB activity pxRetrieveReportData to execute and get the RD output.

October 17, 2019 - 4:30am
Response to PraneethPurighalla

Specifically, you need to set pyFilterOperation to either "=" or "!=" for each page under .pyContent.pyFilters based on your requirement.