Context
Sample
The sample above is to make sure when switch new selection from value prompt, report will be disappeared. At the same time, ask you to specify filters. Certainly, we can make interface much better in real application. (it is intended to show idea only.)
Prompt
First value prompt
Second List box
This filter #prompt ('pFilter1_Column','token')# makes it possible to have values depending on the selection of value prompt. Please also note that cascade source is specified for list box.
Prompt description script below
case when ( ParamDisplayValue('pFilter1_Column') = 'No Filter' ) then ('No Filter')
when ( (ParamDisplayValue('pFilter1_Column') <> 'No Filter') and ( ParamDisplayValue('pFilter1_Values') is null ) ) then ('Specify ' + ParamDisplayValue('pFilter1_Column'))
else (ParamDisplayValue('pFilter1_Column') + ': ' + ParamDisplayValue('pFilter1_Values'))
end
Query
The key to make filters flexible is to apply prompt token
#Prompt('pFilter1_Column', 'token')# in (?pFilter1_Values?)
Layout
The main report only renders with showData variable
The ShowData is only defined as two cases:
- There is no filter, or
- Some values are specified
Otherwise, business users will get indication that they need to specify value. In this case, they will go back either to choose no filter, or specify value. The good idea is report takes no time to give business users response.
No comments:
Post a Comment