Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Before report trigger execution sequence

user12024310Aug 25 2011 — edited Aug 25 2011
Hi,
What is the execution sequence of the before report trigger ?

In the report builder help, the definition says "The Before Report trigger fires before the report is executed *but after queries are parsed and data is fetched*."


But the oracle document "Oracle iDS Reports: Build Internet Reports: Volume 2: Student Guide" says

"Before a report executes; *after queries are parsed, but before records are fetched*


I have built a report where, i am populating a table A with some data in the before report trigger. The data model query is a "select * from A ". But the report o/p is blank since the before report trigger was fired after the query was parsed and fetched. My understanding is that the queries should only be parsed but not fetched before the "before report trigger"

Regards,
Suresh

Comments

M. Kelnhofer-Oracle
Hi,

this is an important question.
In fact the online help is right: Before its execution the query is parsed and data fetching is strarted.
Thus any plsql operation that may influence the query and the data accessed is too late in the BEFOREREPORT trigger.

THe issue is that there is no error message or warning. THe problem scenario bandwidth is wide: From "no problem at all" to constant or intermittent error scenarios or worst case unrecognized problems like missing records or any strange behavior in the layout.

So very carefull while using BEFOREREPORT trigger

Ciao
Markus
user12024310
thanks for the reply,

In that case, in what scenario we would need a before report trigger. Isn't it almost the same as After report trigger ?

Regards,
Suresh
InoL
Well, that is confusing. In the help (of 6i) about Report trigger order of execution it says:

(...)
5 Queries are parsed.
6 Before Report trigger is fired.
7 SET TRANSACTION READONLY is executed (if specified via the READONLY argument or setting).
8 The report is executed and the Between Pages trigger fires for each page except the last one.
(...)
In steps *7 through 9, avoid DML* statements that would modify the contents of the tables on which the report is based.
(...)

That would indicate that DML is possible in step 6!
1 - 3
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 22 2011
Added on Aug 25 2011
3 comments
2,781 views