Friday, February 24, 2012

checking report expression syntax

Hello!

I have a report that I am writing that was displaying perfectly, until I had to add in group totals and "sum" some of the expressions. When I did that for some reason it over rode the "format percent" part of the expresson and is no longer "formatting as a percent"

Any tips of where I could go to get my syntax in order?

Any help would be appriciated!!

If you can, post the expression that you are using.

One quick idea is that for the format string to work, you need to have your expression return the correct type. For example, if your expression returns a string and you are formatting a float as a percent, it isn't going to work.

|||

This is one of the expressions Im using :

Sum(Val(FormatPercent((Fields!ID30_DaysCNT.Value/Fields!TOTAL_UPB_CNT.Value),0)))

This among many other things in this report are making me crazy!!

Thanks for any input :)

|||

try moving the FormatPercent to the outside of the sum expression:

FormatPercent(Sum(Fields!ID30_DaysCNT.Value/Fields!TOTAL_UPB_CNT.Value))

|||Ok that actually worked....awesome thanks!!|||But wait, what about the Val() that needs to go in there ? how do I do it with that ?|||I thought you said it works now. Is there a reason you need to use the Val function?|||It did work until I got towards the end of the document.....I need the Val because sporatically throughout my report there are NAN and Infinity's ...but sometimes the Zero's do show through ....

No comments:

Post a Comment