Home General

Question on if/then statement, getting an error

edited June 2011 in General
? I am having an issue on an if/then statement in Report Explorer and I
am not sure why. I am on the Design tab and adding a calculation to a

Here is my statement:

if (DBCalc2.Value-Query['QTY_NEEDED']) > Query['QTY_AVAIL'] then
Value := Query.['QTY_AVAIL']
if (DBCalc2.Value-Query['QTY_NEEDED']) < 0 then
Value := 0
Value := (DBCalc2.Value-Query['QTY_NEEDED']);

When I try and compile it, I get:
Error: Variable1OnCalc, Line 2: Expected: '(' or '[', but found '['

Really that doesn't make any sense.
Thanks in advance for any help.

--- posted by geoForum on http://www.newswhat.com


This discussion has been closed.