Hi,
I have a list report with 5 columns( Col1,Col2,Grand Total,Min,Max). I want to introduce a value prompt such that it has 3 options in the drop-down viz., Min,Max and All.When the option Min is selected from the drop-down then only those records for which Grand Total < Min should be displayed.Similarly when Max option is chosen, only those records for which Grand Total > Max shld be displayed. For All option, all the records shld be displayed.
Plz provide me with a workaround for this.
Thanx,
Dipsy
Static list in prompt with conditional filter:
(?prompt?='Min' and [grandtotal]<[min]) or (?prompt?='Max' and [grandtotal]>[max]) or (?prompt?='All')
Hi,
I tried your solution but I was not able to achieve the desired output.
The records in the list are not getting filtered.
Thanx,
Dipstm
Something wrong with your filter expression. Post it so we can take a look.
Hi,
I had created a value prompt with satic choices as follows:-
0 ( Use Value) Minimum(Display Value)
1 ( Use Value) Maximum(Display Value)
2 ( Use Value) All( Display Value)
parameter name for the prompt was p_qty and the filter expression was as follows:-
(?p_qty?= 0 and [Grand Total]<[Overall Min]) or (?p_qty?= 1 and [Grand Total]>[Overall Max]) or (?p_qty?= 2 )
Plz let me knw if I am doing somthing wrong.
Thanx,
Dipstm
Almeids,
I tried it too. It was not working. But when I changed to the following expression, it worked. This idea is really good. Thank you.
case ?Prompt?
when 'Min' then ([grandtotal]<[min])
when 'Max' then ([grandtotal]>[max])
else (1 = 1)
end
Dipstm-
I think that prompts always return string values. Try '0' instead of 0, etc. (or better still, actual strings!)
Jamesqi-
I'm surprised that works, it's either something new in C8 or you got lucky. While CASE statements work OK for expressions in calculated data items, I'd be careful with using them in filters where the OR contruct seems to be safer.