Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 03 Jul 2007 at 1:37pm
I would create a formula and then display the formula on the report. This way you don't have to override existing data, you are just displaying the new data in a different field.
if A>10 and B=10 then 'Good' else CStr(B);
The thing you have realize is that the If statement has to return the same data type. So that is why I converted B into a string instead of leaving it as a number.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 03 Jul 2007 at 11:09pm
Are you using Crystal syntax? I just typed it into a dummy report and it works fine. Did you type it in exactly as it is here? Maybe you added a semi-colon after the 'Good' line? Copy and paste it here if you still get the error.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum