I would like to create a prompt for an Operator sign - > or < or = or <> etc.
I will be using it as part of an SQL (Query subject) for example
select *
from
Ã, Ã, Ã, Ã, tablea
where
Ã, Ã, Ã, Ã, b promptA(< or > or = or <>) #prompt('Country')#.
Thanks,
Hi,
Why not just extend your expression to use another prompt macro for the operator as well?
For example:
select *
from
tablea
where
b.promptA #prompt('Operator','token','=')# #prompt('Country')#
Best regards,
MF
Thank you for the reply. I will try that. But what would the datatype be - is token a string?
How do I go about storing > , <, = so that users could choose it from a drop down menu?
Thank you for your help
Hi,
The Token datatype is used where you want to pass the results of the prompt back as entered. If you used a string datatype, the entered value would be encapsulated in quotes, which would not be legal syntax in this part of the expression.
To give the users a dropdown list of operators, you will need to add a value prompt to your report. In the properties of the prompt, make sure it is connected to your 'Operator' parameter, and add static choices for each operator you want displayed.
Hope that helps,
MF.
You could also use compund filter, meanning
( #prompt('Choise')#=1 and Country>#prompt('Country')# )
or
( #prompt('Choise')#=2 and Country<#prompt('Country')# )
or
( #prompt('Choise')#=3 and Country=#prompt('Country')# )
or
( #prompt('Choise')#=4 and Country<>#prompt('Country')# )
Thank you all. I was able to get the report working. Appreciate all your help.