i am working with report service in sql server 2005.
I have a problem with calculation.
what i want to do is something like this
=IIf Fields!total_spb_week_this_year.Value= 0 then 0
else
100 * (Fields!total_xch_comp_week_this_year.Value +
Fields!total_xch_1_4_1_week_this_year.Value) /
Fields!total_spb_week_this_year.Value
but i dont know what shall i add and wher shall i put.
i put this command in expression in the filed but it didnt work.
thanks alot for any help.
voroojaki just tried this and it seems that it is working, but i dont know how can i round it.
=IIF (Fields!total_spb_week_this_year.Value>0 ,
(Fields!total_xch_comp_week_this_year.Value +
Fields!total_xch_1_4_1_week_this_year.Value) * 100 /
Fields!total_spb_week_this_year.Value,0)
but thre result is 72.256471568124
but i want to get 72
or if it is 72.68545121654 i want to get 73
how is it possible.
i put ROUND at the begining but it didnt work.
thanks|||You can use Formatting
Format (value,"N").....|||thanks,
i tried to use round and it worked some how, can u please explain this function to me, because i also need to have with one digit decimal. i used round (X,1) but in some rows that it is for example 2.4000001, it dowsnt give me me 2,4 or if it is 2.5.99999 it is not giving me 2.6.
thanks alot for ur help.|||This is the formatting options provided in the reporting service.
Format (value,"N") -- two decimal points
Format(value,"N1") -- one decimal point
etc..,
No comments:
Post a Comment