PDA

View Full Version : Using Several Tables as Arrays in report?


ABC123

Robert Little
04-17-2008, 05:44 PM
I am stumped as how to do this. Maybe as a lookup in a report or as
an Array. Maybe it can't be done.

See attached jpg for info.

Thanks
Robert

Tim Kiebert
04-17-2008, 08:21 PM
An expression similar to below should work. It assumes the context of the expression is in a form or report based on you data table and that 'DBH' is numeric.


eval("Lookup("+quote(alltrim(formclass))+",\"DBH="+DBH+"\",\"L2\")*L2")

Robert Little
04-18-2008, 01:20 PM
Thanks Tim for your reply.
----------------------------------------------------
formclass="class-74 "
dbh=24
L2=2


? eval("Lookup("+quote(alltrim(formclass))+",\"DBH="+DBH+"\",\"L2\")*L2")
ERROR: Argument is incorrect data type

Made change below:
? eval("Lookup("+quote(alltrim(formclass))+",\"DBH="+DBH+"\",\"L2\")*val(L2)")
= 644
It Works.

I can only get it to work in the Interactive Window. I have tried to
modify it many ways in Expression Builder and the Calculated Values
window in Reports with no luck.

Robert