Page 1 of 2
Choosing filters to apply
Posted: Wed Feb 07, 2024 6:52 am
by yuns
Hi
Is there a way to create multiple filters but allow users to choose which filter to apply at runtime (Preview)?
Re: Choosing filters to apply
Posted: Wed Feb 07, 2024 9:55 am
by Lech Kulikowski
Hello,
You can use the Request From User variables for this task.
Thank you.
Re: Choosing filters to apply
Posted: Thu Feb 08, 2024 5:44 am
by yuns
Hi,
What I meant was I have 2 filters that is set to "Request from User"
However, is there a way to allow user to choose which filter to use when previewing the report, without having to check and uncheck "Request from User"

- Screenshot 2024-02-08 133829.png (5.83 KiB) Viewed 4271 times
For example.
For an instance, i would like to filter using
ONLY hire date range,
Another instance, I would like to filter using
ONLY Cess Date,
Another instance, I would like to filter using
BOTH
Re: Choosing filters to apply
Posted: Fri Feb 09, 2024 11:43 pm
by Lech Kulikowski
Hello,
You can add additional boolean variables that will apply only the necessary filters.
Thank you.
Re: Choosing filters to apply
Posted: Wed Feb 14, 2024 5:54 am
by yuns
Hi Lech,
Thank you for your quick response.
I'm quite new to stimulsoft and still trying to figure things out.
I tried to create a boolean variable but I can't seem to change the Key value. It will always be defaulted to false

- Screenshot 2024-02-14 134929.png (7.19 KiB) Viewed 4222 times
And I am not sure how to write the expression to retrieve the boolean value
is it
Code: Select all
{bool_variable[0]? "true" : "false"}
But this code doesn't seem to work
Re: Choosing filters to apply
Posted: Wed Feb 14, 2024 9:27 am
by Lech Kulikowski
Hello,
You can add additional variables, and you use the following expression:
{ApplyFilter && HireDateRange}
Thank you.
Re: Choosing filters to apply
Posted: Thu Feb 15, 2024 2:08 pm
by yuns
Hi Lech,
I am able to create 2 boolean variables
However, in the filter section, I wrote these 2 expressions

- MultipleFilter.png (20.48 KiB) Viewed 4140 times
When I tried to preview the report, I have to tick both checkbox for my report to display data because i'm using the AND operator in the filter screen
I tried the OR operator, but when I tick both checkbox, it applies both expression separately. (Means records that meet the hire date range criteria ONLY, and records that meet the cessation date range criteria ONLY)
This doesn't give the user the flexibility to choose either 1 or 2 filters to apply

- PreviewMultipleFilter.png (6.43 KiB) Viewed 4140 times
For example.
If I ONLY tick Hire Date, my data should apply the hire date range ONLY
If I tick Hire Date and Cessation Date, my data should only show records that meets
BOTH the Hire Date Range and Cessation Date Range critieria.
Re: Choosing filters to apply
Posted: Thu Feb 15, 2024 10:07 pm
by Lech Kulikowski
Hello,
Please send us a sample report with test data that reproduces the issue for analysis.
Thank you.
Re: Choosing filters to apply
Posted: Tue Feb 20, 2024 1:40 pm
by yuns
hi Lech,
Where can I get test data? is there a document I can follow to create this sample report?
Re: Choosing filters to apply
Posted: Tue Feb 20, 2024 10:29 pm
by Lech Kulikowski
Hello,
You can use the Embed All Data to resources option.
Thank you.