Beruflich Dokumente
Kultur Dokumente
TCS INTERNAL
OVERVIEW
Oracle Report 6i is a D2K tool which will help us to build simple and complex production quality report. While making a report in our GEHC project we dont use the Report Wizard. We make the report manually. It gives us much flexibility to develop report.
TCS INTERNAL
Report Design
Before you start development, consider: Specification
Data retrieval Common features
Structure
Style
TCS INTERNAL
TCS INTERNAL
Types Of Reports
Tabular report List of Products Product Number Description NNNN XXXXXXXXXX NNNN XXXXXXXXXX NNNN XXXXXXXXXX NNNN XXXXXXXXXX NNNN XXXXXXXXXX
Customer Name: XXXXXXXXXX Product Price NNNN 9999.99 NNNN 9999.99 NNNN 9999.99
TCS INTERNAL
Qty 9999.99
Amount
TCS INTERNAL
Report Editor
DATA MODEL: It displays a structural representation of the data in a report. The object do not appear in the report output, but the structure determines the layout style and the data objects provide the values that appear in the layout objects. ( Data Structures and Values to be displayed).
LAYOUT MODEL: Displays the layout objects in a report and allows us to make many modifications to any layout object. All layout objects have properties that we can modify in a property pallet. The hierarchy of the layout is determined by the DATA model.
(Formatting information about how the values will appear in the output)
TCS INTERNAL
Datalink
Parameters
TCS INTERNAL
Query: Select the DATA for our report. Group: Organize the data to form the required hierarchical structure Columns: Contain individual data values. Database columns exist by default or contain the data from the database column or expressions defined in the query. We can also create Formula, Summary and Place Holder Column Types.
TCS INTERNAL
Performs a user-defined computation Executes a PL/SQL function Must return a value Can be a Character, Number, Date Returned value must match datatype
function CF_SALCALCFormula return Number is begin return(:salary) end;
TCS INTERNAL
Data Model:Placeholder
CP_xxx
An empty container at design time Populated by another object at run time Before report trigger Formula column at report level Formula column in same group or below placeholder
CF_xxx
NOTE: You cannot populate a placeholder by writing code in the placeholders own Formula property.
TCS INTERNAL
TCS INTERNAL
Parameter: Provide for runtime deafults or user input We can create also the User Parameters There are basically two types of user parameters we create Bind Parameter Lexical Parameter.
TCS INTERNAL
TCS INTERNAL
TCS INTERNAL
Always do the following Specify column aliases when substituting column names. Create lexical parameters explicitly in the Object Navigator (Report Builder creates bind parameters if necessary). Enter an initial value for parameters that affect query validation when NULL.
TCS INTERNAL
Frame : Contains objects and print only once Repeating Frame: Contains other objects and print once for each record of the associated groups. Field: Contains data and other variable and their formats. Text: We can use this for Lebel.
TCS INTERNAL
M_G_xxx
Group frame encloses other objects and controls the format, frequency, and position of several objects simultaneously.
Body
TCS INTERNAL
@ !
Sizing Objects
fixed
expand contract
variable
TCS INTERNAL
@ !
Report Triggers:
There are 5 types of report Triggers. But we commonly use three types of Report Triggres 1> After Parameter Form. 2> Before Report. 3> After Report.
TCS INTERNAL
Format Trigger
BOOLEAN TYPE
TCS INTERNAL
Format Trigger
Format Triggers: Exist on most layout objects Can suppress entire layout section (master group frame): no records fetched Can suppress display of individual records (repeating frame): all records fetched
TCS INTERNAL
Warning
WHEN <exception> THEN SRW.MESSAGE(999, Warning: report continues);
Error
WHEN <exception> THEN SRW.MESSAGE(999, Error: report terminated); RAISE SRW.PROGRAM_ABORT;
TCS INTERNAL
Example
SRW.DO_SQL(CREATE TABLE SRW_LOG (RPT_NAME VARCHAR2(40), REC_NUM NUMBER, MSG_TEXT VARCHAR2(80))); SRW.DO_SQL(INSERT INTO SRW_LOG (RPT_NAME REC_NUM, MSG_TEXT) VALUES (PAY_REPORT, TO_CHAR(:ID), :LAST_NAME||PAY REPORT RUN));
TCS INTERNAL
Full report definition (includes source code and comments) Modifiable through Builder binary, executable Portable as binary
.rep
No source code or comments Not modifiable binary, executable Sometimes portable as binary (if no PL/SQL)
.rex
Full report definition Not modifiable ASCII text, not executable Fully portable as text
TCS INTERNAL
TCS INTERNAL
TCS INTERNAL
TCS INTERNAL
TCS INTERNAL
TCS INTERNAL
Questions Please
TCS INTERNAL
THANK YOU
TCS INTERNAL