I would like to do something a little bit tricky and I'm not able to achieve. Basically, I'm creating a filter for a query (So a parametrized query) wich is created dynamically depending on users criteria. Basically, we have a form before the execution of the report where users can select different options (Which are the parameters for the query).
Those options are:
- Active or inactive users --> parm0
- Period of data users want to see (Start/End Date) -->parm1, parm2
- Reference day to decide if users are active or not. -->parm3
So, what I'm trying to do is to have a variable, setted as an expression, wich will define the "skeleton" of the filter, which will be completed with other variables which store the values of Start/End Date and the reference day. As an example, it will be something like this:
Code: Select all
IIF(parm0 = 1, "Where someColumn = "A" and startDate = {parm1} and endDate = {parm2} and refDate = {parm3}",Where someColumn = "B" and startDate = {parm1} and endDate = {parm2} and refDate = {parm3}")
Code: Select all
"Select anyColumn1, anyColumn2 From anyTable {varFilter}"
Thanks in advance.