Hi Guys,
I'm working in an enhancement right now and a particular data item on the report is required to convert zero values into a dash ('-'). I tried using the following statements below but I'm getting parsing error in each statement.
if([MI_PTD].[Budgt Hrs] =0) then('-') else ([MI_PTD].[Budgt Hrs])
if([MI_PTD].[Budgt Hrs] =0) then("-") else ([MI_PTD].[Budgt Hrs])
if([MI_PTD].[Budgt Hrs] =0) then '-' else ([MI_PTD].[Budgt Hrs])
if([MI_PTD].[Budgt Hrs] =0) then "-" else ([MI_PTD].[Budgt Hrs])
What character should I enclosed the dash character with?
Hope you guys could help me out on this.
Regards,
Digz
Hi,
My opinion is that you shouldn't try to change the type of data return by your field "[MI_PTD].[Budgt Hrs]", by converting 0 to "-"; you'll have then mixed contents of number & char, I'm not sure it's good (if you have calculation somewhere).
Isn't it possible simply to use a conditionnal formatting based on "[MI_PTD].[Budgt Hrs]", the type will be boolean, the expression something like [MI_PTD].[Budgt Hrs]=0, and you'll change the text displayed in the report ("-" instead of 0) when the variable returns "true".
It's just an idea, It could be wrong depending on your case...
Hope it helps.
vinc.
Did you tried to set the "Zero Value Character" to "-" in the Data-Format?