I tried to use wildcards in the parameter field window, but I get a wrong result... I used the * wildcard.
Is it possible to use wildcards in the parameter field window? If possible, which?
I've never tried using wildcard parameters. If there is no direct way, you could get the same effect by adding the parameter to a wildcard value in a Formula Field
Wildcards will work, but your selection formula must be setup to use the like statement (as Gary states). * for multiple characters, ? for a single character i.e. to return all values where the third character is a 'S' with any characters after that;
I didn't use the like-operator in the Record selection formula but the =-operator.
{Item.ITM_CODE}={?artCodeSelection}
The ITM_CODE is a string.
It seems to be not necessary to use the like-operator.
What do you think?
If you do not use the Like, then the only records with the * will be returned... probably nothing.
The only problem with the Like is, it will query the db when it doesn't really need to when the wildcard * is used.
i.e. the sql send to the db will be something like
... and {Item.ITM_CODE} Like '*' and ...
This is not really need if the db isn't large.
You can do this for a more optimized solution
(if {?artCodeSelection} = '*' then true
else
{Item.ITM_CODE}={?artCodeSelection}
)
The sql Generated when a * is used will be
... and true and ...
The sql Generated when a * is Not used will be
... and {Item.ITM_CODE} Like '*' and ...
Generally I normally use Like because its easy, but on the really slow reports, then I will optimize the code.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.