May 7, 2013 at 12:17 am
Hi all,
I have a report in it i need to produce colour based on comparison of comp and allcomp when i select region parameter as "all"
i need to do comparison between comp and mum_comp when i select region parameter as "mumbai"
i need to do comparison between comp and rowcomp when i select region parameter as "row"
i need to do comparison between comp and southcomp when i select region parameter as "south"
for this i write an expression as shown below but it gives some syntax error pls help me
the report runs from stored procedure
=iif(Parameters!region_id.Value=0,(iif(Fields!comp.Value*0.05>Fields!allcomp.Value,"Green","Red"),
iif(Parameters!region_id.Value=1,(iif(Fields!comp.Value*0.05>Fields!mum_comp.Value,"Green","Red"),
iif(Parameters!region_id.Value=2,(iif(Fields!comp.Value*0.05>Fields!rowcomp.Value,"Green","Red"),
iif(Parameters!region_id.Value=3,(iif(Fields!comp.Value*0.05>Fields!southcomp.Value,"Green","Red"),"yellow")
May 7, 2013 at 12:57 am
Just try below code. if necessary you can modify accordingly
=SWITCH
(
Parameters!region_id.Value=0 AND Fields!comp.Value*0.05>Fields!allcomp.Value,"Green"
Parameters!region_id.Value=1 AND Fields!comp.Value*0.05>Fields!mum_comp.Value,"Green"
Parameters!region_id.Value=2 AND Fields!comp.Value*0.05>Fields!rowcomp.Value,"Green"
Parameters!region_id.Value=3 AND Fields!comp.Value*0.05>Fields!southcomp.Value,"Green","Red"
)
Hope this will work with you
May 7, 2013 at 1:03 am
Hi,
Thanks for your sugition but it gives synatx error when i write in expression
May 7, 2013 at 1:18 am
Hi,
my report works fine but it doesn't show any color it gives only black with the above expression,
please help me
Regards,
Mahesh
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply