Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

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
variable.

Here is my statement:

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

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

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



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

Comments

This discussion has been closed.