Consultor Eletrônico



Kbase P56856: How to pass a temp-table to report builder engine ?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   03/12/2003
Status: Unverified

GOAL:

How to pass a temp-table to report builder engine ?

FIX:

It is not possible to pass a temp-table to report builder engine. You will have to create a table in the database and index that table with a user session id field to allow concurent access on that table.
TABLE myTempRpt
FIELD userKey AS INTEGER
...
INDEX idx AS PRIMARY UNIQUE userKey /* primary index for user session */

You application populates the table before calling Report Builder Engine.
CREATE myTempRpt.
ASSIGN userKey = <put your user key here>
... /* put report data fields here */

Call Report Builder Engine and pass userKey field as a filter for your report.
The userKey value is used by the query of the report to retrive only the data
for a specific user/session.

After the report is done clean up the table, again using the userKey value:
FOR EACH myTempRpt WHERE userKey = <userKey value> :
DELETE myTempRpt.
END.