I think PGTEK is trying to do something like:
If isnull({@BAC}) //I don't think that this is ever the case
OR // NOT AND
trim(totext({@BAC})) in ["0",""] // Check for blank
then
"0.0"
else
totext(({@BCWP}/{@BAC})*100,6,""

//Parenthetical error and added precision
Note that the AND would never evaluate correctly.
I didn't review all of your post, but I'm confident that you haven't explored your data fully as my original post was correct.
If {@BCWP} is zero, then you'll get zero, and if you haven't exposed enough decimal places, then the number may appear to be zero when it is just a small number, as totext may lose precision.
I've no idea why you're converting this to a string, just use:
If isnull({@BAC})
OR // NOT AND
{@BAC} = 0
then
0
else
({@BCWP}/{@BAC})*100
Right click the result and format the number to have greater decimal precision.
Also place the
{@BCWP}
{@BAC}
fields alongside so you can see what they contain.
-k