Home » Developer & Programmer » Reports & Discoverer » how to use Global temporary table (oracle 9i)
how to use Global temporary table [message #645436] Sun, 06 December 2015 23:40 Go to next message
snsiddiqui
Messages: 168
Registered: December 2008
Senior Member
I create this global temporary table and create a form, where I am calling report through a push button but report isn't showing records.
Kindly advise me, how to use global temporary table in reports.

-------------------------
-- GLOBAL TEMPORARY TABLE
-------------------------
create global temporary table PROD_INV
(
WDATE DATE,
DOCNO VARCHAR2(10),
CUSTM VARCHAR2(7)
)
on commit preserve rows;

-----------------
-- CALLING REPORT
-----------------
Run_Product(REPORTS, :Global.Report_Path || 'SD_PRODINV', ASYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);
Re: how to use Global temporary table [message #645444 is a reply to message #645436] Mon, 07 December 2015 02:22 Go to previous messageGo to next message
John Watson
Messages: 8051
Registered: January 2010
Location: Global Village
Senior Member
It is a very long time since I worked with Forms and Reports 9i, but I think you will find that the report is run by a different session, so it can't see any rows inserted by your Forms session.

By the way, please try to avoid saying "record" when you mean "row" Smile
Re: how to use Global temporary table [message #645445 is a reply to message #645444] Mon, 07 December 2015 02:33 Go to previous message
Littlefoot
Messages: 21509
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
A workaround might be populating the GTT in report's After Parameter Form trigger, if possible. For example, if you used a (stored) procedure in a form, you can call it from the report as well - you'd just pass required parameters. Or, if you can distinguish which records you want in the GTT and have a mechanism (i.e. WHERE clause) to do so, report can easily do it as well.

Otherwise, you might need to discard the GTT idea and return back to a "normal" table (and include some kind of an identifier which will prevent two or more users reading the same data).
Previous Topic: Multiple user inputs report
Next Topic: Reports are running slow
Goto Forum:
  


Current Time: Sat Nov 16 17:56:14 CST 2019