Monday, 5 May 2014

Event Rules

Group & Columnar of Reports event Rules
Initialize section, Advance section, Before Level Break. Init LVL brk Header section, Do Section, After Last object Printed, init Break Section, End Break Section, End Section, Suspend Section

Overview: Event rules enable you to perform logical operations such as:
·                     Processing conditional logic
·                     Moving values into or between objects
·                     Performing calculations and complex expressions
·                     Attaching existing business functions or system functions

Event rules process when an event, such as a page break, occurs. Events are attached to controls, such as a variable, a constant, a section, or a report. As a report is processed, the run-time engine pauses certain points to process logic that has been attached. These points are called events, and you can use these events to insert custom logic for processing. The events are categorized into different levels depending upon the section of the report.

Initialize report header
This is the first event that occurs during the processing of a report. This event should only be used when the report header is selected. This event is processed before any values are derived for report objects. initial values to variables and for performing preparatory routines are set here.

End report header
This event occurs after the report header processes. This event should only be used when the report header is selected.

Initialize page header
This event occurs at the beginning of a report after any report header logic and before the page header section processes for the first time.  It also processes every time a page break occurs.  This event is used to initialize values that cannot be set until after the report header logic executes.

End page header
Once the page header has been processed, End page header Event Rules are invoked. This event is used for processing immediately after a page header.

Report Footer Section Level Events

Initialize report footer
This event fires once at the end of a report after all processing is done and before the report footer is printed. This event is used to initialize values to print in the report footer.   

End report footer
This is the last event that occurs during the processing of a report. When the Batch Engine has finished the report footer, this event will occur. This event is used to do processing after the report footer has been printed

Initialize page footer
This event occurs just before the processing of the page footer.  This event is used to initialize values to be printed in the current page footer section. 
  
End page footer
This event is invoked once the page footer has been processed. This event is used to do processing immediately after page footer.

Do Initialize Printer
Resolves and validates the printer name

Initialize Report
This event resets global Report Variables and global ER Variable values if the event point has no ER in a subsystem; preserve global variable values otherwise. The Initialize Report event is executed only once per report, and is always the first event to be processed. 

End Report
This event is executed once at the end of report processing, and is always the last event to be processed. 

Advance Section
This event occurs each time a fetch is done from the database. This event is used to perform processing on objects before a fetch.

After Last Object Printed
This event occurs after a row is printed to an output file. This event is used to perform processing after a row has been output.  

Before Level Break
This event is used to do processing after a fetch, but before any level breaks are checked.
Do Balance Auditor
This event is used for the drill down feature.
Do Section
This event occurs after values have been assigned to print out to a printer or an output file.  This event occurs before any information for the current record is written to the PDF file.  

Do Tabular Break
This event occurs when any of the business view fields set as level breaks change.  This event is used to do processing that requires a change of values in any of the level break fields.

End Break section
This event Occurs after a level break finishes.  This event is used to do processing immediately after a level break.

End Lvl Brk Footer Section
This event is used to do processing immediately after a level break footer.

End Lvl Brk Header Section
This event is used to do processing immediately after a level break header.

End section
This event occurs after a batch process has completed processing the last set of section values.  This event is used to do processing immediately after a section ends.  This event is useful for last record and end-of-file procedures. 

Init Break section
This event occurs after a level break begins processing.  This event initializes a child section that is joined to the parent section on a level break.  

Init Lvl Brk Footer section
This event is used to do processing immediately before a level break footer.

Init Lvl Brk Header section
This event is used to do processing immediately before a level break header.

Initialize Section
This event occurs when a batch process encounters a section for the first time, before any of the structures or pointers related to the section have been established.

Refresh Section
The first time the UBE encounters a child section; it issues an initialize section event.  Each subsequent time the child section is to be processed, the batch process uses Refresh Section.  At this point, the internal structures and pointers for the child section have been established and the UBE is about to select a new group of records for the child section.  This event is only available on child sections.

Suspend Section
When it determines that a page break will be necessary, UBE "suspends" processing for any objects and sections that will not fit on the current page. This event is used to do processing when a page break occurs.

Do Column Heading  (constant)
This event occurs when the column is initialized. 

Do Variable/Do Constant
This event occurs just before the font and color are selected for the report object and before the value of the object is translated into a printable string of characters and output to the page.

End Variable/End Constant
This event occurs immediately after the object has been processed, even if the object is invisible or suppressed. 

Initialize Variable/Initialize Constant
Each time a report object, or variable, is to be processed, this event is invoked. This event is used to do processing before an object processes. 

Column Inclusion
Valid only for tabular sections, this event occurs after a record is fetched from the database. This event to perform calculations.  

An event rule variable (prefix VA) is a user-created object that inherits the characteristics of a selected data dictionary field

To create an event rule variable
·                     On Report Design, click the section to which you want to attach the event rule variable, and then choose Event Rules.
·                     On Event Rules Design, click the down arrow to display the Events list.
·                     Choose an event from the Events list.
·                     Click the Variables button.
·                     Click Add.
·                     On the Variable Item Selection form, click Find to display the valid data dictionary fields
·                     Choose the data item whose characteristics you want the variable to inherit, and then click Next
·                     On the Variable Options Selection form click one of the following Scope options, depending on the purpose for which the variable is being created.
o           Section
§                Report ,  Event
·                     Type a meaningful name in the field provided, and then clicks Finish.
·                     The Event Rules Variables form reappears displaying the event rule variable you just created.
·                     The variable is assigned one of the following prefixes based on the scope specified.
o           evt_ (Event) 
rp

Page Breaks
Inserting Page Breaks
In the columnar and group sections of a report, the following types of page breaks can be inserted.
1.             The last line printed on a page can be reprinted on the following page.
2.             A manual page break can be inserted after detail sections and report headers.

Note: - The two features mentioned above cannot be used simultaneously.

To print the last line on a page as the first on the succeeding page

1.             Double-click the group or columnar section you want to insert the feature.
2.             As per the section type, an appropriate Section form appears.
3.      Click the Advanced tab.
4.      Select Reprint At Page Break
5.   Click OK.

To insert a manual page break
1.             Double-click the detail or report header section you want to insert the feature.
2.   Click the Advanced tab.
3.   Select Page Break After
4.   Click OK.
    

2 comments: