+ All Categories
Home > Documents > Before Report Trigger Info

Before Report Trigger Info

Date post: 08-Oct-2014
Category:
Upload: raam-val
View: 102 times
Download: 0 times
Share this document with a friend
2
Where to Use the beforeReport Trigger in an XML/BI Publisher Data Template Report? [ID 422873.1] Modified 11-FEB-2011 Type HOWTO Status PUBLISHED In this Document Goal Solution Applies to: BI Publisher (formerly XML Publisher) - Version: 5.6.2 to 5.6.3 [Release: 5 to 5] Information in this document applies to any platform. 24-Feb-2010 Goal Using Data Triggers in BI Publisher Enterprise. The XML Publisher User's Guide references using Data Triggers for PL/SQL<package name>.<function name>using the beforeReport trigger. Q1: What is a beforeReport trigger used for in a report? Do you have any examples of a beforeReport trigger that is used in a report? What does it do? Q2: Where do you create this beforeReport trigger? In the database? How do you call this data trigger in BI Publisher? Solution A1: Please find the following information with regards to ' beforeReport trigger ' BeforeReport trigger is ALWAYS fired BEFORE the query is performed and records are fetched. About report triggers: from report builder Report triggers execute PL/SQL functions at specific times during the execution and formatting of your report. Using the conditional processing capabilities of PL/SQL for these triggers, you can do things such as customize the formatting of your report, perform initialization tasks, and access the database. To create or modify a report trigger, you use the Report Triggers node in the Object Navigator. Report triggers must explicitly return TRUE or FALSE. Oracle Reports has five global report triggers. You cannot create new global report triggers. The trigger names indicate at what point the trigger fires: Example: How to print certain number of records ------------------------------------------------------ In BeforeReport trigger (after the query is parsed) you can call SRW.Set_Maxrow(query_name, <number of records to be printed>); Example: function BeforeReport return boolean is begin SRW.SET_maxrow('Q_1', 5); return (TRUE); end; You can also use a user parameter to dynamically specify the number of records that you want to print. A2: The location of the trigger indicate at what point the trigger fires: Place a beforeReport trigger anywhere in your data template before the <dataStructure> section.. A beforeReport trigger fires before the dataQuery executed. Place an afterReport trigger after the <dataStructure> section. An afterReport trigger fires after you exit and after XML output has been generated. The before and after report triggers in Data templates are there to mimic functionality from the legacy Oracle Reports. Most commonly this is used when XML Publisher is used in the Ebusiness Suite. In BI Publisher Enterprise you would need to have an Oracle Database instance. The trigger is a boolean function inside a PL/SQL package. Related Products Oracle E-Business Suite > Applications Technology > Technology Components > BI Publisher (formerly XML Publisher) Keywords TEMPLATE; XML PUBLISHER; DATA TEMPLATE; BEFOREREPORT; PL SQL; BI PUBLISHER; REPORT BUILDER; USERS GUIDE Rate this document Search 77 Like
Transcript
Page 1: Before Report Trigger Info

Where to Use the beforeReport Trigger in an XML/BI Publisher Data Template Report? [ID 422873.1]

Modified 11-FEB-2011 Type HOWTO Status PUBLISHED

In this Document Goal Solution

Applies to:

BI Publisher (formerly XML Publisher) - Version: 5.6.2 to 5.6.3 [Release: 5 to 5]Information in this document applies to any platform.24-Feb-2010

Goal

Using Data Triggers in BI Publisher Enterprise. The XML Publisher User's Guide references using Data Triggers for PL/SQL<package name>.<function name>using thebeforeReport trigger.

Q1: What is a beforeReport trigger used for in a report?Do you have any examples of a beforeReport trigger that is used in a report? What does it do?

Q2: Where do you create this beforeReport trigger? In the database? How do you call this data trigger in BI Publisher?

Solution

A1: Please find the following information with regards to ' beforeReport trigger '

BeforeReport trigger is ALWAYS fired BEFORE the query is performed and records are fetched.

About report triggers: from report builderReport triggers execute PL/SQL functions at specific times during the execution and formatting ofyour report. Using the conditional processing capabilities of PL/SQL for these triggers, you cando things such as customize the formatting of your report, perform initialization tasks, andaccess the database. To create or modify a report trigger, you use the Report Triggers node in theObject Navigator. Report triggers must explicitly return TRUE or FALSE. Oracle Reports has fiveglobal report triggers. You cannot create new global report triggers. The trigger names indicateat what point the trigger fires:

Example:How to print certain number of records------------------------------------------------------

In BeforeReport trigger (after the query is parsed) you can callSRW.Set_Maxrow(query_name, <number of records to be printed>);

Example:

function BeforeReport return boolean isbeginSRW.SET_maxrow('Q_1', 5);return (TRUE);end;

You can also use a user parameter to dynamically specify the number of records that you want toprint.

A2: The location of the trigger indicate at what point the trigger fires:Place a beforeReport trigger anywhere in your data template before the <dataStructure> section.. A beforeReport trigger fires before the dataQuery executed.Place an afterReport trigger after the <dataStructure> section. An afterReport trigger fires after you exit and after XML output has been generated.

The before and after report triggers in Data templates are there to mimic functionality from the legacy Oracle Reports. Most commonly this is used when XML Publisher is used in the Ebusiness Suite. In BI Publisher Enterprise you would need to have an Oracle Database instance. Thetrigger is a boolean function inside a PL/SQL package.

Related

Products

Oracle E-Business Suite > Applications Technology > Technology Components > BI Publisher (formerly XML Publisher)

Keywords

TEMPLATE; XML PUBLISHER; DATA TEMPLATE; BEFOREREPORT; PL SQL; BI PUBLISHER; REPORT BUILDER; USERS GUIDE

Rate this document

Search

77Like

Page 2: Before Report Trigger Info

Back to top

Copyright (c) 2007, 2010, Oracle. All rights reserved. Legal Notices and Terms of Use | Privacy Statement


Recommended