Home » Developer & Programmer » Reports & Discoverer » Oracle reports builder
Oracle reports builder [message #235929] Tue, 08 May 2007 07:43 Go to next message
mbl73
Messages: 7
Registered: April 2007
Junior Member
Hi, I am relatively new to Oracle, can anyone help with this? I created a report based on a table created in the Before Parameter Form trigger(it is populated in the After Parameter Form trigger). I have 2 problems, I have to compile the report every time I open it in Report Builder. The second problem is that only one person can access the report at a time. I want to create the table based on the username so that more than one person can access it
Re: Oracle reports builder [message #235931 is a reply to message #235929] Tue, 08 May 2007 07:47 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Do not create a table in report's trigger; that's a bad idea. You'd rather create an "ordinary" table in this user's schema, or even a "global temporary table" which might suit your needs even better, as it will allow every user to use its own record set (although in the same table). Read more about this concept in Oracle documentation (or use Googled).
Re: Oracle reports builder [message #235946 is a reply to message #235931] Tue, 08 May 2007 08:42 Go to previous messageGo to next message
mbl73
Messages: 7
Registered: April 2007
Junior Member
Thank you for responding so quickly. What I need to do is create these tables when the report is going to be run and then delete them after the report is completed. Regarding the "global temporary table" suggestion, if I create this one table "temp" outside of the report, how can I,in the report,declare it as a global temporary table thus allowing access by multiple users? Just for reference, if I create a global temporary table with the name g_temp within a report, if 3 different users access the report at the same time, will there be any conflict with the table name?
Thanks again ...
Re: Oracle reports builder [message #236047 is a reply to message #235946] Tue, 08 May 2007 15:56 Go to previous messageGo to next message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
It seems that you didn't decide to read about global temporary tables (GTT).

Do NOT CREATE ANY TABLE from report! Whether it is just a table, a global temporary table or ... whichever table Oracle invents. Just start SQL*Plus (or SQL Developer, TOAD, etc.) and CREATE GLOBAL TEMPORARY TABLE. It will remain in this schema forever, and all users who decide to run the report will be able to use it (if you grant them privileges to do that).

As of your last question - no, there will be no conflict. All three users will read from the same GTT, all of them seeing only their own recordset.

I don't know what your report does and why do you think you need a table; is it a CTAS? Do you first have to populate it and then execute a report which reads from it? Whatever it is, DO NOT CREATE A TABLE and drop it in a report!
Re: Oracle reports builder [message #236311 is a reply to message #236047] Wed, 09 May 2007 09:54 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
Hi littlefoot,
what is this CTAS? Rest is fine
Ashu

[Updated on: Wed, 09 May 2007 09:54]

Report message to a moderator

Re: Oracle reports builder [message #236351 is a reply to message #236311] Wed, 09 May 2007 12:57 Go to previous message
Littlefoot
Messages: 21813
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Create Table As Select:
CREATE TABLE emp_copy AS
  SELECT * FROM emp
  WHERE deptno = 10;
Previous Topic: refcursor query that returns different refcursor types
Next Topic: Display images in reports10g
Goto Forum:
  


Current Time: Thu Jul 04 10:58:39 CDT 2024