Dear support
I have created report with sql postgre datasource and I need to create any userfriendly filter for users.
I am able to create filter with textbox ( picture 1) - I created new variable pnps_id and then I put it into select: where my_data_id = @pnps_id. It works OK
but I want to create filter with select list (picture 2). - I created new variable but when I change type of variable from VALUE to LIST, checkbox "Alow as SQL parameter" is disabled.
is there any solution, how to create filter with checkbox list (picture 2) ?
Thanks
How to create report filter with checkbox list
How to create report filter with checkbox list
- Attachments
-
- 02variable.png (135.64 KiB) Viewed 1830 times
-
- 01variable.png (182.27 KiB) Viewed 1830 times
-
- Posts: 7334
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to create report filter with checkbox list
Hello,
You can use the following query:
select * from Products where CategoryID in {(var1.Count == 0 ? "('')" : "(" + var1.ToQueryString("'") + ")")}
Thank you.
You can use the following query:
select * from Products where CategoryID in {(var1.Count == 0 ? "('')" : "(" + var1.ToQueryString("'") + ")")}
Thank you.
- Attachments
-
- ListInQueryString.mrt
- (9.61 KiB) Downloaded 228 times
Re: How to create report filter with checkbox list
Lech Kulikowski wrote: ↑Mon Mar 07, 2022 10:14 pm Hello,
You can use the following query:
select * from Products where CategoryID in {(var1.Count == 0 ? "('')" : "(" + var1.ToQueryString("'") + ")")}
Thank you.

-
- Posts: 7334
- Joined: Tue Mar 20, 2018 5:34 am
Re: How to create report filter with checkbox list
Hello,
You are welcome.
You are welcome.