I am relatively new to the RTC, and have run into a weird error.
I have some code, that finds the value of different fields in a table. When I run the report in CLassic, it works just like it is supposed to - but when running in it RTC (using a layout) I am getting an error: "You cannot enter 'Profit=Price-Cost' in Integer."
it seems like the RTC thinks it's smart enough to tell us what tyoe of data based on the first record?
FieldValueText := FORMAT(ItemFieldRef.VALUE);
CASE Field.Type OF
Field.Type::Decimal :
BEGIN
IF FieldValueText = '0' THEN
FieldValueText := '';
END;
Field.Type::Integer :
BEGIN
IF FieldValueText = '0' THEN
FieldValueText := '';
END;
Field.Type::Option :
BEGIN
EVALUATE(OptionNo,FORMAT(ItemFieldRef.VALUE));
FieldValueText := SELECTSTR(OptionNo + 1,ItemFieldRef.OPTIONCAPTION);
END;
END;
Answers
FieldRef.VALUE for a option field in Classic returns an integer
FieldRef.VALUE for a option field in RTC returns the verbose option
Henrik Helgesen,
President | Helgesen Consulting
about.me | LinkedIN