Calculated Column Help (OpenInsight 32-Bit)
At 09 NOV 2009 04:36:54PM Richard Richter wrote:
I am trying to created a Calculated Column and having nothing but trouble. The column gets the record key and associateds the key with an appropriate group. I created a report with just the key and the calculated column (CODE_TYPE). When I run the report it bombs to the debugger with the following message:
ENG0010 $CODE_TYPE, line 1. Variable has not been assigned a value.
I have tried everything I can think of to find the problem. I thought it was the data but that wasn't the problem. I have to assume it's in the program:
key={KEY}
Begin Case
Case GE "0000" and key LE "0999"
ans=Diagnostic"
Case GE "1000" and key LE "1999"
ans=Preventive"
Case GE "2000" and key LE "2999"
ans=Restorative"
Case GE "3000" and key LE "3999"
ans=Endodontics"
Case GE "4000" and key LE "4999"
ans=Periodontics"
Case GE "5000" and key LE "5899"
ans=Prosthodontics-Removeable"
Case GE "5900" and key LE "5999"
ans=Maxillofacial Prosthetics"
Case GE "6000" and key LE "6199"
ans=Implant Services"
Case GE "6200" and key LE "6999"
ans=Prosthodontics-Fixed"
Case GE "7000" and key LE "7900"
ans=Oral and Maxillofacial Surgery"
Case GE "8000" and key LE "8999"
ans=Orthodontics"
Case GE "9000" and key LE "9999"
ans=Adjunctive General Services"
End Case
@ANS=ans
Any ideas what the problem could be?
Richard Richter
At 09 NOV 2009 04:50PM rwilson wrote:
shouldnt your case statements be
Case key GE "0000" and key le "0999"
(i.e the 1st booleen is wrong)
also add
Case 1
ans=key
your key value must be outside of your range of 0000 to 9999
Rich
At 09 NOV 2009 04:52PM Mike Ruane wrote:
Richard -
in the lines: key={KEY}
Begin Case
Case GE "0000" and key LE "0999"
Case WHAT? is Greater than or equal to 0000? I think you need the word KEY before the GE in all your cases…
Mike