#1 2023-05-17 19:07:56

kshimeld
Member
Registered: 2023-05-17

Using parameters in filters

I have a dynamic list report that we're trying to add a filter to. We'd like to be able to filter a column based on a parameter (called pid) without modifying the query. We tried adding the filter to a column under 'Configure list' and 'Pre-filter', but we get an error saying:

The report could not be executed: PropertyNotFoundException: Cannot find property pid

Is there something we're missing? I saw in the docs references to ${var} and $P{var} but I'm not sure of the difference. $P{var} doesn't throw the exception, but it doesn't filter. We're just trying to add a filter to only show matches to a certain ID if entered in the parameter called pid.


rsversion.properties:

#Mon Apr 03 12:42:14 CEST 2023
version=RS4.5.0-6088
schemaversion=RS3.0-25
buildDate=1680518534485-2023-04-03-12-41-54

Offline

#2 2023-05-19 07:57:57

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Using parameters in filters

Hi kshimeld,

can you pls post some screenshots of what you are trying to do? You can use http://imgbb.com for this.

Regards,
Eduardo

Offline

#3 2023-05-19 12:14:41

kshimeld
Member
Registered: 2023-05-17

Re: Using parameters in filters

Here's a screenshot of the column filter I'm trying to make: https://ibb.co/K0LnVpG

Offline

#4 2023-05-22 08:57:42

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Using parameters in filters

Hi kshimeld,

this is not supported directly. What you can do is the following:

Parameters must be set in the query.
The workaround in SQL:

SELECT ${pid} PID ....

Then the column PUID is available and in the variant you can build the pre-filter and in the column comparison you can build the filter.

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB