Joined: 20 Aug 2010
Online Status: Offline
Posts: 2
Topic: If Then Statement/Convert a Value Posted: 20 Aug 2010 at 1:58pm
Hello:
I am working on a report to show product compatibility. In the database, a box is checked (Yes) if Product 1 is compatible with Product A; if it is not compatible, the box is left unchecked (No).
When I run the report, the compatibility comes up as 'Yes' or 'No'. I would like to run a formula in that field that converts the 'Yes' value to 'X' and the 'No' value to a blank field. The part of the formula I don't know how to write is bracketed by **, but it would be similar to: If {productA}=Yes then **change the value in the field to X** else **leave the field blank**
Maybe this is not the right approach to the formula? I've tried IIF statements, ToText, ToWords, Replace, CStr and have not made any progress. I am pretty handy with CReports, but I'm not exactly a formula expert.
Any help you can provide would be very much appreciated!
Joined: 20 Aug 2010
Online Status: Offline
Posts: 2
Posted: 23 Aug 2010 at 8:01am
DBlank-
Thanks for your suggestion. There is an error in my formula and the message I get from CR is 'A boolean is required here'. When I click ok, it puts the cursor at the '=' sign.
I've tried some similar operators and I can't seem to come up with an error free formula. Any additional suggestions?
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