Question

Restrict Report operator for particular parameter

  • 24 October 2023
  • 1 reply
  • 26 views

Badge +3

Hi team,

 

How we can restrict some of the report operators for specific parameters

 

Here, for example 

we want only “Equals” operator to be shown for Service Type parameter. But all operators should show for rest of the parameters.

see attached screenshot from FSM smart client 

 


1 reply

Userlevel 2
Badge +7

@Akifscommunity 

Hi,

To remove the ability to pick the operators you need to update the sql in the dataset. Currently the dataset will have something like this in the where clause (PICK_LIST_VIEW.location_from ##LocationFrom $$LocationFrom or @LocationFrom is null). If you update the where clause and use pick_list_view.location_from = @LocationFrom, that will prevent the report user from selecting anything other than Equals.

Another example below

Before Change:

select person_address.address_id as person_address_id,person.person_id,person.first_name,person.last_name,person.person_type,person.job_title,person.start_dt from person CROSS JOIN person_address

Where (person.person_type ##PersonType $$PersonType

 

After change:

select person_address.address_id as person_address_id,person.person_id,person.first_name,person.last_name,person.person_type,person.job_title,person.start_dt from person CROSS JOIN person_address

 

where (person.person_type = @PersonType or @PersonType is null)

 

Cheers!

Reply