Oracle Reports FAQ

download Oracle Reports FAQ

of 34

Transcript of Oracle Reports FAQ

  • 8/13/2019 Oracle Reports FAQ

    1/34

  • 8/13/2019 Oracle Reports FAQ

    2/34

    name, mail userid=./EST>PEB?#&E and /ES%A8E is anempty strin-, it defaults to report nameat runtime.

    ?or printer names, you canoptionally specify a port. ?ore@ample/ES%A8EBprinter,&PT/ES%A8EBprinter, ?#&E

    8O/E#s (hether the report should run incharacter mode or bitmap.

    OR#E%TATT#O%#s the print direction for the report;landscape, portrait, default=.

    /efault /efault &andscape,Portrait

    T!O"SA%/S#s the symbol for the thousandsindicator ;e.-.,

  • 8/13/2019 Oracle Reports FAQ

    3/34

    A Croup Abo:e report contains t(o or more -roups of data. ?or e:ery :alue of the master -roup, the related :alues of thedetail -roup;s= are fetched from the database.

    atri%:

    A 8atri@ ;$ross Tab= report contains one ro( of tables, one column of labels and information in -rid format that is related tothe ro( and column labels. A distin-uished feature of matri@ report is that the number of columns is not 2no(n until the data isfetched from the database. To create a 8atri@ report, at least four -roups are reFuired. One -roup must be crossproduct -roup,t(o of the -roups must be (ith in the cross product -roup to furnish the labels, and at least one -roup must pro:ide the

    information to fill the cells. The -roups can pro:ide to a sin-le Fuery or to multiple Fueries.

    atri% wit& #roup:

    A matri@ (ith -roup report is a -roup abo:e report (ith a separate matri@ for each of the master -roup.

    atri% Report:

    To create a matri@ report, you need at least four -roups one -roup must be a crossproduct -roup, t(o of the -roups mustbe (ithin the crossproduct -roup to furnish the ar-ument or settin-=.7. The report is e@ecuted and the 1et(een Pa-es tri--er fires for each pa-e e@cept the last one. ;%ote that data can be

    fetched at any time (hile the report is bein- formatted.= $O88#Ts can occur durin- this time due to any of thefollo(in-user e@it (ith //&, SR'./OSG& (ith //&, or if O%?A#&"REB$O88#T, and the report fails.

    *. $O88#T is e@ecuted ;if REA/O%&> is specified= to end the transaction.0. After Report tri--er is fired.. $O88#T)RO&&1A$)%OA$T#O% is e@ecuted based on (hat (as specified :ia the O%S"$$ESS

    Tri!!ers in Reports an' Se(uence:

    1efore Parameter ?orm

    After Parameter ?orm

    1efore Report

    1et(een Pa-es

    After Report

    )efore Parameter Form:

    1efore Parameter ?orm ?ires before the Runtime Parameter ?orm is displayed. ?rom this tri--er, you can access andchan-e the :alues of parameters, P&)SG& -lobal :ariables, and reportle:el columns. #f the Runtime Parameter ?orm issuppressed, this tri--er still fires. $onseFuently, you can use this tri--er for :alidation of command line parameters.

    $fter Parameter Form:

    After Parameter ?orm ?ires after the Runtime Parameter ?orm is displayed. ?rom this tri--er, you can access parametersand chec2 their :alues. This tri--er can also be used to chan-e parameter :alues or, if an error occurs, return to the RuntimeParameter ?orm. $olumns from the data model are not accessible from this tri--er. #f the Runtime Parameter ?orm issuppressed, the After Parameter ?orm tri--er still fires. $onseFuently, you can use this tri--er for :alidation of command lineparameters or other data.

    )efore Report:

  • 8/13/2019 Oracle Reports FAQ

    4/34

    1efore Report ?ires before the report is e@ecuted but after Fueries are parsed.

    )etween Pa!es:

    1et(een Pa-es ?ires before each pa-e of the report is formatted, e@cept the :ery first pa-e. This tri--er can be used forcustomiHed pa-e formattin-. #n the Pre:ie(er, this tri--er only fires the first time that you -oes to a pa-e. #f you subseFuentlyreturn to the pa-e, the tri--er does not fire a-ain.

    $fter Report:

    After Report ?ires after you e@it the Pre:ie(er, or after report output is sent to a specified destination, such as a file, aprinter, or an Oracle Office userid. This tri--er can be used to clean up any initial processin- that (as done, such as deletin-tables. %ote, ho(e:er, that this tri--er al(ays fires, (hether or not your report completed successfully.

    *n Oracle Reports w&at is Fle% o'e On+Off,

    On:parent borders ou can set the :alue of aplaceholder column in the follo(in- places

    the 1efore Report Tri--er, if the placeholder is a reportle:el column

    a reportle:el formula column, if the placeholder is a reportle:el column

    a formula in the placeholderIs -roup or a -roup belo( it ;the :alue is set once for each record of the -roup=

    Format Tri!!er:

  • 8/13/2019 Oracle Reports FAQ

    5/34

  • 8/13/2019 Oracle Reports FAQ

    6/34

    &e@ical references are placeholders for te@t that you embed in a SE&E$T statement. >ou can use le@ical references toreplace the clauses appearin- after SE&E$T, ?RO8, '!ERE, CRO"P 1>, OR/ER 1>, !A9#%C, $O%%E$T 1>, and START'#T!.

    >ou create a le@ical reference by enterin- an ampersand ;M= follo(ed immediately by the column or parameter name. Adefault definition is not pro:ided for le@ical references. Therefore, you must do the follo(in-

    1efore you create your Fuery, define a column or parameter in the data model for each le@ical reference in the Fuery.

    ?or columns, you must enter 9alue if %ull, and, for parameters, you must enter #nitial 9alue. Report 1uilder uses these

    :alues to :alidate a Fuery (ith a le@ical reference. $reate your Fuery containin- le@ical references.

    E@ SE&E$T MPE%A8E %A8E, MPE8P%O E%O, MPO1 RO&E ?RO8 MTablename

    )in' references + )in' Variables:

    1ind references ;or bind :ariables= are used to replace a sin-le :alue in SG& or P&)SG&, such as a character strin-, number,or date. Specifically, bind references may be used to replace e@pressions in SE&E$T, '!ERE, CRO"P 1>, OR/ER 1>,!A9#%C, $O%%E$T 1>, and START '#T! clauses of Fueries. 1ind references may not be referenced in ?RO8 clauses or inplace of reser:ed (ords or clauses.

    >ou create a bind reference by enterin- a colon ;= follo(ed immediately by the column or parameter name. #f you do not

    create a column or parameter before ma2in- a bind reference to it in a SE&E$T statement, Report 1uilder (ill create aparameter for you by default.

    3ow to perform DD" Statements in Oracle Reports,

    "sin- sr(.dosFl, u can perform //& Statements. e cannot use E%ecute imme'iatein Oracle Reports.

    E@ sr(.dosFl ;I$reate table jdmtest ;pempno %umber, pename 9archar3 ;50=, psal %umber=I=L

    3ow to run a report wit& in a Report,

    "sin- Sr(.runreport

    E@ sr(.runreport;ImoduleB(eb5.rdf destypeBScreen paramformByesI=L

    SR4DO5S6"5F$*"2RE:

    )K Suppose you (ant your o(n error messa-e raised, KK instead of the default error messa-e. KK >ou could handle thise@ception in the follo(in- (ay K)

    EN$EPT#O%(hen SR'./OSG&?A#&"RE thensr(.messa-e;000, IError occurred (hile creatin-table $!E$S.I=L

    &at are t&e 'ifferent "ayout ob7ects,

    Frames

    ?rame surrounds other layout objects, enablin- control of multiple objects simultaneously, ensurin- that they maintain theirpositions relati:e to each other in the report. A frame mi-ht be used to surround all objects o(ned by a -roup to surroundcolumn labels. ?rame fires only once.

    Repeatin! Frames

    Repeatin- frames act as placeholder for -roups ;repeatin- :alues= and present ro(s of data retrie:ed from the database.The repeatin- frame is fired once for each record of the -roup.

  • 8/13/2019 Oracle Reports FAQ

    7/34

    Fiel's

    ?ields act as placeholder for column :alues. They define the formattin- attributes for all columns displayed in the report. Afield is one of the objects that can be located inside a frame or repeatin- frame.

    )oilerplates

    1oilerplates consist of te@t and -raphics that appear in a report each time it is run. E@ A leabl appearin- abo:e a column ofdata is 1oiler te@t. Craphics dra(n in the layout as (ell as te@t added to the layout are boilerplate.

    &at is 'ata mo'el,

    specify the data for the report, a data model should be defined. A data model is composed of some or all of the follo(in-data definition objects.

    04 6uery

    Gueries are A%S#standard SG& Select statements that fetch data from a standard database such as Oracle, /13 etc.These select statements are fired each time the report is run. >ou can select any number of Fueries to select data from anynumber of tables.

    14 #roups

    Croups determine the hierarchy of data appearin- in the report and are primarly used to create brea2s in the report. Oraclereport automatically creates a -roup for each Fuery, but you are not limited to this default. >ou can create a ne( -roup in thedata model and included a column that you (ant ti use as the brea2 column.

    84 .olumn

    $olumn contains the data :alues for a report. /efault report columns, correspondin- to the tables included in the FuerysSE&E$T list are automatically created by the table, Oracle Report, then each column is replaced in the -roup associated (iththe Fuery that selected the column. #f you (ant to perform summaries and computations on the database column :alues you cancreate ne( columns. >ou can also reassi-n one or more columns to a -roup you ha:e created.

    94 Parameters

    Parameters are :isible for your report that enables you to chan-e selection criteria at runtime. Oracle report automaticallycreates a set of System Parameters a t runtime, but you can create your o(n as (ell. >ou can create parameters to replaceeither sin-le literal :alues or entire e@pressions in any part of a Fuery. >ou can reference parameters else(here in the reportsuch as P&)SG& constructs pro:idin- conditional lo-ic for the report.

    4 Data "ink

    /ata &in2 is used to establish parentchild relationship bet(een Fueries and -roups :ia column matchin-.

    &at is #roup Filter,

    A -roup filter is a P&)SG& function that determines (hich records to include in a -roup, if the ?ilter Type property is P&)SG&.

    The function must return a boolean :alue ;TR"E or ?A&SE=. Ependin- on (hether the function returns TR"E or ?A&SE, thecurrent record is included or e@cluded from the report. >ou can access -roup filters from the Object %a:i-ator, the PropertyPalette ;the P&)SG& ?ilter property=, or the P&)SG& Editor.

    Definition "evel: -roup

    On Failure: E@cludes the current record from the -roup.

    #roup filter e%ample

    function filtercomm return boolean isbe-in

  • 8/13/2019 Oracle Reports FAQ

    8/34

    if comm #S %OT %"&& then if comm 00 then return ;?A&SE=L else return ;TR"E=L end ifL else return ;?A&SE=L for ro(s (ith %"&& commissions end ifLendL

    #roup filter Restrictions

    Croup filters cannot be added to -roups if ?ilter Type is ?irst or &ast.

    Croup filters cannot be added to crossproduct -roups.

    #n a -roup filters, you can read the :alues of Report 1uilder columns and parameters of the correct freFuency ;loo2 at

    the rule belo(=, but you cannot directly set their :alues. ?or e@ample, you can use the :alue of a parameter called$O"%T in a condition ;e.-., #? $O"%T B 0=, but you cannot directly set its :alue in an assi-nment statement;e.-., $O"%T B 0=. %ote also that the use of P&)SG& -lobal :ariables to indirectly set the :alues of columns orparameters is not supported. #f you do this, you may -et unpredictable results. >ou also cannot reference any pa-edependent columns ;i.e., Reset At of Pa-e= or columns that rely on pa-edependent columns in a -roup filter.

    The function that you enter for a -roup filter can only depend upon the follo(in- columns

    1. A database column o(ned by the -roups Fuery or a Fuery abo:e it in the data 8odel hierarchy2. $omputed columns ;formulas or summaries= that depend on unrelated Fueries ;i.e., computed columns that

    do not depend upon columns in the -roup, the -roups ancestors, or the -roups descendants=

    Oracle Reports ;4< Fle%fiel' Support $P*:

    "sin- Oracle Applications fle@fields routines (ith Oracle Reports, you can build reports that display fle@fields data easily andin a number of (ays

    /isplay any indi:idual se-ment :alue, prompt, or description.

    /isplay se-ment :alues, prompts, or descriptions from multiple fle@field structures ;or conte@ts= in the same report.

    /isplay se-ment :alues, prompts, or descriptions from different fle@fields in the same report.

    /isplay t(o or more fle@field se-ment :alues, prompts, or descriptions, concatenated (ith delimiters, in the correct

    order. This includes description information for dependent,

    #ndependent, and table :alidated se-ments.

    Restrict output based upon a fle@field ran-e ;lo( and hi-h :alues=.

    Pre:ent reportin- on fle@field se-ments and :alues that users do not ha:e access to ;fle@field :alue security=.

    Specify order by, -roup by, and (here constraints usin- one or more, or all se-ment columns.

    Oracle Reports an' Fle% fiel's Reportritin! Steps:

    Step 0: Define your )efore Report Tri!!er =t&is step is always t&e same>

    >ou al(ays call ?%/ SR'#%#T from the 1efore Report Tri--er SR'."SEREN#T ;?%/ SR'#%#T=L

    This user e@it sets up information for use by fle@ fields, user profiles, the concurrent mana-er, and other Oracle Applicationsfeatures. >ou must include this step if you use any Oracle Application Object &ibrary features in your report ;such as concurrentprocessin-=.

    Step 1: Define your $fter Report Tri!!er =t&is step is always t&e same>

    >ou al(ays call ?%/ SR'EN#T from the After Report Tri--er SR'."SEREN#T ;?%/ SR'EN#T=L

    This user e@it frees all the memory allocation done in other Oracle Applications user e@its. >ou must include this step if youuse any Oracle Application Object &ibrary features in your report ;such as concurrent processin-=.

  • 8/13/2019 Oracle Reports FAQ

    9/34

    Step 8: Define your re(uire' parameters

    >ou define the parameters your report needs by usin- the /ata 8odel Painter. >ou use these parameters in the user e@itcalls and SG& statements.

    >ou must al(ays create the P$O%$REG"EST#/ le@ical parameter. ?%/ SR'#%#Tuses this parameter to retrie:einformation about the concurrent reFuest that started this report. The P?&EN/ATA parameter holds the SE&E$T fra-ment ofthe SG& Fuery. The initial :alue is used to chec2 the :alidity of a Fuery containin- this parameter and to determine the (idth ofthe column as specified by the column alias. #ts initial :alue is some strin- that contains columns (ith a cumulati:e (idth morethan the e@pected (idth reFuired to hold the data. 8a2e sure the (idth of this column is sufficient. #f there are total 40 se-mentsin the table then the safest initial :alue (ill be ;SEC8E%TQnSEC8E%T3QnSEC8E%T4 ... SEC8E%T40=

    >ou determine the (idth by determinin- the len-th of that strin-. That len-th is rou-hly the number of characters in the tablealias plus the len-th of the column name, times the number of se-ments your code combinations table contains, times thenumber of structures you e@pect,plus more for delimiter characters as sho(n in the strin- abo:e.

    Step 9: Define your ot&er parameters

    >ou define the rest of the parameters your report needs by usin- the /ata 8odel Painter. >ou use these parameters in theuser e@it calls and SG& statements.

    Step : .all F/D F"E?S6" from your )efore Report Tri!!er to populate P5F"E?D$T$

    %e@t, -i:en that you (ant to display fle@field information li2e concatenated :alues and descriptions, and arran-e them inorder, you ma2e one call to ?%/ ?&ENSG& from the 1efore Report Tri--er specifyin- the le@ical parameters. This call chan-esthe :alue of the le@ical parameter P?&EN/ATA at runtime to the SG& fra-ment that selects all fle@fields :alue data. ?ore@ample, the parameter chan-es to

    ;SEC8E%TQnSEC8E%T3QnSEC8E%T4QnSEC8 E%T5=.

    'hen you incorporate this le@ical parameter into the SE&E$T clause of a Fuery, it enables the Fuery to return theconcatenated se-ment :alues that are needed as input to other AO& user e@its. These e@its then retrie:e the actual fle@fieldinformation for display purposes.

  • 8/13/2019 Oracle Reports FAQ

    10/34

    !ere is an e@ample ?%/ ?&ENSG& call. %otice that the ar-uments are :ery similar to other fle@field routine callsL $O/EBand %"8B desi-nate the 2ey fle@field and its structure, respecti:ely. ?or a report on a different 2ey fle@field ;such as the System#tems fle@field=, you (ould use a different $O/E and %"8.

    SR'.RE?ERE%$E;PSTR"$T%"8=L SR'."SEREN#T;?%/ ?&ENSG& $O/EBC& %"8BPSTR"$T%"8 APP&S!ORT%A8EBSG&C& O"TP"TBP?&EN/ATA 8O/EBSE&E$T /#SP&A>BA&&=L

    >ou should al(ays reference any source column)parameter that isused as a source for data retrie:al in the user e@it. This-uarantees that this column)parameter (ill contain the latest :alue and is achie:ed by SR'.RE?ERE%$Ecall as sho(nabo:e.

    Step ;: .all F/D F"E?S6" from your )efore Report Tri!!er to populate ot&er parameters

    >ou call ?%/ ?&ENSG& once for e:ery le@ical parameter such as P'!ERE or POR/ER1>.

    Step @: Define your report (uery or (ueries

    /efine your report Fuery G

    SE&E$T MP?&EN/ATA $?&EN/ATA ?RO8 $O/E$O81#%AT#O%STA1&E '!ERE $O/E$O81#%AT#O%STA1&E.STR"$T"RE/E?#%#%C$O&"8% B MPSTR"$T%"8

    The Fuery fetches the data reFuired to be used as input for the ?&EN#/9A& user e@it later. %ote Al(ays pro:ide a column alias ;$?&EN/ATA in this e@ample= in the SE&E$T clause that is the name of column. Thisname of the column is reFuired in ?%/ ?&EN#/9A&.

    'hen the report runs, the call to ?%/ ?&ENSG& fills in the le@ical parameters. As a result the second Fuery (ould loo2

    somethin- li2e

    SE&E$T ;SEC8E%TSEC8E%T3SEC8E%T4 SEC8E%T5= $?&EN/ATA ?RO8 $O/E$O81#%AT#O%STA1&E '!ERE $O/E$O81#%AT#O%STA1&E.STR"$T"RE/E?#%#%C$O&"8% B 0

    Step A: .reate formula columns

    %o( create columns $?&EN?#E&/ and $/ES$A&& ;and any others your report uses= correspondin- to the :alues anddescriptions displayed in the report. They all are in -roup C. 1e sure to adjust the column (idth as appropriate for the :aluethe column holds ;such as a prompt, (hich mi-ht be as lon- as 40 characters=.

    $ttention:"se (ord(rappin- for fle@field columns if necessary to a:oid possible truncation of your :alues. /o this bysettin- SiHin- to E@pand.

    Step B: Populate se!ment values formula column

    To retrie:e the concatenated fle@field se-ment :alues and description, you incorporate the fle@fields user e@its in thesecolumns. #n the column definition of $?&EN?#E&/, you incorporate the ?%/ ?&EN#/9A& user e@it call in the formula field. >oupass the concatenated se-ments alon- (ith other information to the user e@it, and the user e@it populates the concatenated:alues in this column as specified by the 9A&"E to2en. A typical call to populate se-ment

    SR'.RE?ERE%$E;PSTR"$T%"8=L SR'.RE?ERE%$E;$?&EN/ATA=L

  • 8/13/2019 Oracle Reports FAQ

    11/34

    SR'."SEREN#T;?%/ ?&EN#/9A& $O/EBC& %"8BPSTR"$T%"8 APP&S!ORT%A8EBSG&C& /ATAB$?&EN/ATA 9A&"EB$?&EN?#E&/ /#SP&A>B A&& =L RET"R%;$?&EN?#E&/=L

    Step 0B A&& =L RET"R%;$/ES$A&&=L

    >ou ha:e created parameters and columns that are containers of all the :alues to be displayed. %o(, in the follo(in- steps,you create the layout to display these :alues on the report.

    Step 00: .reate your 'efault report layout

    "se the Report 'iHard to -enerate the default layout. /eselect $?&EN/ATA. Specify a &abel and a reasonable 'idth for the columns you (ant to display.

    Oracle Reports ta2es you to the layout painter. Cenerate and run the report.

    Step 01: Finis& your report

    Adjust your report layout as needed.

  • 8/13/2019 Oracle Reports FAQ

    12/34

    0> &at is Ref .ursor 6uery,

    Description:A ref cursor Fuery uses P&)SG& to fetch data for the report. #n a ref cursor Fuery, you specify a P&)SG& functionthat returns a cursor :alue from a cursor :ariable.

    Definition "evel:Fuery

    On Failure:%o data is returned to the Fuery.

    2sa!e /otes

    'hen you ma2e a ref cursor Fuery the child in a data lin2, the lin2 can only be a -roup to -roup lin2. #t cannot be a

    column to column lin2.

    #f you use a stored pro-ram unit to implement ref cursors, you recei:e the added benefits that -o alon- (ith storin-

    your pro-ram units in the Oracle database.

    E%ample:

    set ser:eroutput on declare type tcursor is ref cursorL rcursor tcursorL t:al %umber B 3L c:al %umberL be-in if t:al B then open rcursor for

    select no from t (here noB0L else

  • 8/13/2019 Oracle Reports FAQ

    13/34

    open rcursor forselect num from t (here numBL

    end ifL fetch rcursor into c:alL dbmsoutput.putline;I9alue Ic:al=L close rcursorL e@ception (hen others then dbmsoutput.putline;IError occurred Isubstr;sFlerrm,,3+0==L endL

    ) Output 9alue

    Packa!e wit& ref cursor e%ample:

    )K This pac2a-e spec defines a ref cursor type that could be referenced from a ref cursor Fuery function. #f creatin- this specas a stored procedure in a tool such as SG&KPlus, you (ould need to use the $REATE PA$ACE command.K)

    PA$ACE c: #S type comprec is RE$OR/ ;deptno number, ename :archar;0=, compensation number=L type compc: is RE? $"RSOR return comprecL

    E%/L

    Packa!e wit& ref cursor an' function e%ample:

    )K This pac2a-e spec and body define a ref cursor type as (ell as a function that uses the ref cursor to return data. Thefunction could be referenced from the ref cursor Fuery, (hich (ould -reatly simplify the P&)SG& in the Fuery itself. #f creatin-this spec and body as a stored Procedure in a tool such as SG&KPlus, you (ould need to use the $REATE PA$ACE and$REATE PA$ACE 1O/> commands.K)

    PA$ACE c: #S type comprec is RE$OR/ ;deptno number, ename :archar;0=, compensation number=L type compc: is RE? $"RSOR return comprecL function emprefc;deptno number= return compc:L E%/L

    PA$ACE 1O/> c: #S function emprefc;deptno number= return compc: is tempc: c:.compc:L be-in if deptno 30 then open tempc: for select deptno, ename, .3+K;saln:l;comm,0== compensation from emp (here deptno B deptnoL else open tempc: for select deptno, ename,

    .+K;saln:l;comm,0== compensation from emp (here deptno B deptnoL end ifL return tempc:L endL E%/L

    1> 3ow 'o you 'ebu! Report from Reports )uil'er,

    ToolsTrace

  • 8/13/2019 Oracle Reports FAQ

    14/34

    Specify tracin! options via t&e Report )uil'er built-in packa!e usin!

    SR'.TRA$ESTART SR'.TRA$EE%/ SR'.TRA$EA//OPT#O%S SR'.TRA$ERE8OPT#O%S

    Trace Option Synta% Parameter Description

    SR'.TRA$ESTART

    SR'.TRA$ESTART;filename,USR'.TRA$EREP&A$ESR'.TRA$EAPPE%/V,SR'.TRA$EOPTS=L

    ?ilename#s the name of the file in (hich Report1uilder stores lo--in- #nformationW

    SR'.TRA$EAPPE%/Adds the ne( information to the end ofthe file.

    SR'.TRA$EREP&A$EAdds the ne( information to the end ofthe file.

    SR'.TRA$EOPTSApplies the trace options mas2pre:iously defined bySR'.TRA$EOPTS.8AS.

    SR'.TRA$EE%/ SR'.TRA$EE%/;=L

    SR'.TRA$EA//OPT#O%

    SR'.TRA$EOPTS.8AS BSR'.TRA$EoptsX SR'.TRA$Eopts . . .YLSR'.TRA$EA//OPT#O%;SR'.TRA$EOPTS=L

    SR'.TRA$ERE8OPT#O%

    SR'.TRA$EOPTS.8AS BSR'.TRA$EoptsX SR'.TRA$Eopts . . .YLSR'.TRA$ERE8OPT#O%;SR'.TRA$EOPTS=L

  • 8/13/2019 Oracle Reports FAQ

    15/34

    ask Option Description

    SR'.TRA$EA&& #ncludes all possible trace information in the lo- file.

    SR'.TRA$EAPP #ncludes trace information on all the report objects in the lo- file.

    SR'.TRA$E1R &ists brea2points in the lo- file.

    SR'.TRA$E/ST&ists distribution lists in the lo- file. >ou can use this information to determine (hich section (as sent to(hich destination.

    SR'.TRA$EERR #ncludes error messa-es and (arnin-s in the lo- file.SR'.TRA$EP&S #ncludes trace information on all the P&)SG& objects in the lo- file.

    SR'.TRA$EPR? #ncludes performance statistics in the lo- file.

    SR'.TRA$ESG& #ncludes trace information on all the SG& in the lo- file

    8> .an you &ave more t&an one layout in a Report,

    #t is possible to ha:e more than one layout in a report by usin- the additional layout option in the layout editor.

    9> &at is t&e "ock Option in t&e Report,

    1y usin- the loc2 Option, (e cannot mo:e the fields in the &ayout Editor outside the frame. This is useful for maintainin- the

    fields.

    > &at is 'efaultin! 2nit of easure in Report,

    #nch

    ;> &ic& Proce'ure 'isplays messa!e number an' Te%t you specify,

    SR'.8ESSACE;Number, Text=L

    @> 3ow many Types of .olumns are t&ere in Reports,

    ?ormula column, Summary $olumn and Placeholder $olumn.

    A> &at is t&e inimum /umber of #roups re(uire' fro a atri% report,

    8inimum 5 our Croups are reFuired for a matri@ Report.

    B> &ic& of t&e followin! Options is vali' for Panel+Print Or'er Property in Report )uil'er,

    Across /o(n)/o(n Across

    0 .an "e%ical Reference be ma'e in P"+S6" Statement,

    %o

    00> &at is 2ser E%it *n Oracle Reports,

    A user e@it is a pro-ram that you (rite and then lin2 into the Report 1uilder e@ecutable or user e@it /&& files. >ou build usere@its (hen you (ant to pass control from Report 1uilder to a pro-ram you ha:e (ritten, (hich performs some function, and thenreturns control to Report 1uilder.

    "ser e@its can perform the follo(in- tas2s

    Perform comple@ data manipulation

    Pass data to Report 1uilder from operatin- system te@t files

  • 8/13/2019 Oracle Reports FAQ

    16/34

    8anipulate &O%C RA' data

    Support P&)SG& bloc2s

    $ontrol real time de:ices, such as a printer or a robot

    >ou can use user e@its for other tas2s, such as mathematical processin-. !o(e:er, Oracle $orporation recommends thatyou perform such tas2s (ith P&)SG& (ithin Report 1uilder.

    >ou can (rite the follo(in- types of user e@its

    ORA$&E Precompiler user e@its

    O$# ;ORA$&E $all #nterface= user e@its

    %onORA$&E user e@its

    >ou can also (rite a user e@it that combines both the ORA$&E Precompiler interface and the O$#.

    Precompiler Oracle 2ser E%it:

    An ORA$&E Precompiler user e@it incorporates the ORA$&E Precompiler interface. This interface supports the follo(in-

    >ou can (rite a subroutine in one of the host lan-ua-es ;Ada, $, $O1O&, ?ORTRA%, Pascal, P&)l= and embed SG&

    commands.

    The user e@it can access ORA$&E ;:ia embedded SG& commands= and Report 1uilder :ariables, parameters, and

    columns.

    1ecause of these features, you (ill (rite most of your user e@its as ORA$&E Precompiler user e@its.

    O.* =Oracle .all *nterface> 2ser e%it:

    An O$# user e@it incorporates the ORA$&E $all #nterface. This interface allo(s you to (rite a subroutine that contains callsto ORA$&E. A user e@it that incorporates only the O$# ;and not the ORA$&E Precompiler interface= cannot access Report1uilderI :ariables, parameters, and columns.

    /on-Oracle user e%it:

    A nonORA$&E user e@it does not incorporate either the ORA$&E Precompiler interface or the O$#. ?or e@ample, a nonORA$&E user e@it mi-ht be (ritten entirely in $. 1y definition, a nonORA$&E user e@it cannot access ORA$&E or Report1uilder :ariables, parameters, and columns.

    01> &y 'o we call F/D SR*/*T user e%it from )efore Report Tri!!er,

    ?%/ SR'#%#T sets your profile option :alues and allo(s Oracle Application Object &ibrary user e@its to detect that anOracle Reports pro-ram has called them. ?%/ SR'#%#T also allo(s your report to use the correct or-aniHation automatically.

    08> &y 'o we call F/D SRE?*T user e%it from $fter Report Tri!!er,

    ?%/ SR'EN#T ensures that all the memory allocated for Oracle Application Object &ibrary user e@its has been freed upproperly.

    09> &y 'o we call F/D F"E?S6" user e%it from )efore Report Tri!!er,

    F/D F"E?S6" :

    $all this user e@it to create a SG& fra-ment usable by your report to tailor your SE&E$T statement that retrie:es fle@field:alues. This fra-ment allo(s you to SE&E$T fle@field :alues or to create a '!ERE, OR/ER 1>, CRO"P 1>, or !A9#%Cclause to limit or sort the fle@field :alues returned by your SE&E$T statement. >ou call this user e@it once for each fra-ment youneed for your select statement. >ou define all fle@field columns in your report as type $!ARA$TER e:en thou-h your table mayuse %"81ER or /ATE or some other datatype.

    Synta%:

  • 8/13/2019 Oracle Reports FAQ

    17/34

    ?%/ ?&ENSG& $O/EBZfle@field codeZ APP&S!ORT%A8EBZapplication short nameZ O"TP"TBZoutput le@ical parameter nameZ 8O/EBZU SE&E$T '!ERE !A9#%C OR/ER 1>VZ X/#SP&A>BZUA&& fle@field Fualifier se-ment numberVZY XS!O'/EPSECBZU> %VZY X%"8BZstructure definin- le@icalZ 8"&T#%"8BZU> %VZY

    XTA1&EAASBZcode combination table aliasZY XOPERATORBZU B B B [B ZZ 1ET'EE% G1EVZY XOPERA%/BZinput parameter or :alueZY XOPERA%/3BZinput parameter or :alueZY

    .ODE:

    Specify the fle@field code for this report ;for e@ample, C&=. >ou call ?&ENSG& multiple times to set up SG& fra-ments (henreportin- on multiple fle@fields in one report.

    $PP"5S3ORT5/$E:

    Specify the short name of the application that o(ns this fle@field ;for e@ample, SG&C&=.

    O2TP2T:

    Specify the name of the le@ical parameter to store the SG& fra-ment. >ou use this le@ical later in your report (hen definin-the SG& statement that selects your fle@field :alues. The datatype of this parameter should be character.

    ODE:

    Specify the mode to use to -enerate the SG& fra-ment. 9alid modes are

    i> SE"E.T:

    Retrie:es all se-ments :alues in an internal ;non\displayable= format. #f you SE&E$T a fle@field Fualifier, and thatfle@field se-ment is a dependent se-ment, then fle@fields automatically selects both the parent se-ment and the dependentse-ment. ?or e@ample, if the Fualifier references the Subaccount se-ment, then both the Account ;the parent= and theSubaccount se-ment columns are retrie:ed.

    /ote:>ou reuse the le@ical you use in the SE&E$T clause in the CRO"P 1> clause.

    ii> 3ERE:

    Restrict the Fuery by specifyin- constraints on fle@field columns. The fra-ment returned includes the correct decodestatement if you specify 8"&T#%"8.

    >ou should also specify an OPERATOR and OPERA%/S.

    >ou can prepend a table alias to the column names usin- the TA1&EAAS to2en.

    iii> 3$V*/#:

    callin- procedure and functionality as '!ERE

    iv> ORDER )C:

    Order Fueried information by fle@field columns. The fra-ment orders your fle@field columns and separates them (ith acomma. The fra-ment returned includes the correct decode statement if you specify 8"&T#%"8.

  • 8/13/2019 Oracle Reports FAQ

    18/34

    >ou use the 8O/E to2en (ith the /#SP&A> to2en. The /#SP&A> to2en specifies (hich se-ments are included in your SG&fra-ment in your le@ical parameter. ?or e@ample, if your 8O/E is SE&E$T, and you specify /#SP&A>BZA&&Z, then yourSE&E$T statement includes all se-ments of the fle@field. Similarly, if your 8O/E is '!ERE, and you specify /#SP&A>BZA&&Z,then your '!ERE clause includes all se-ments. ?reFuently you (ould not (ant all se-ments in your '!ERE clause, since thecondition you specify for the '!ERE clause in your actual Fuery (ould then apply to all your se-ments ;for e@ample, if yourcondition is Z B 4Z, then SEC8E%T, SEC8E%T3, ... , SEC8E%Tn (ould each ha:e to be eFual to 4=.

    v> S3ODEPSE#:

    S!O'/EPSECBZ%Z disables automatic addition of depended upon se-ments to the order criteria. The default :alue isZ>Z. This to2en is :alid only for 8O/EBZOR/ER 1>Z in ?&ENSG&.

    vi> /2 or 2"T*/2:

    Specify the name of the le@ical or source column that contains the fle@field structure information. #f your fle@field uses justone structure,specify %"8 only and use a le@ical parameter to hold the :alue. #f your fle@field uses multiple structures, specify8"&T#%"8 only and use a source column to hold the :alue. #n this case the user e@it builds a decode statement to handle thepossible chan-in- of structures mid\report. The default is %"8BZ0Z.

    vii> T$)"E$"*$S :

    Specify the table alias you (ould li2e pretended to the column names. >ou use TA1&EAAS if your SE&E$T joins toother fle@field tables or uses a self\join.

    viii> OPER$TOR:

    Specify an operator to use in the '!ERE clause. The operators ZB B B [B G1E 1ET'EE%Z performle@ical comparisons, not numeric comparisons. 'ith G1E ;Guery 1y E@ample= and 1ET'EE% operators, the user can specifypartial fle@field :alues to match for one or more se-ments.

    ?or e@ample, if OPERA%/ is Z0\\$AJ\Z ;assumin- a four\se-ment fle@field (ith a delimiter of ]\]=, the first se-mentmust match 0 and the third se-ment is li2e ]$AJ]. The resultin- SG& fra-ment is

    SEC8E%TB]0] A%/ SEC8E%T4 E ]$AJ

    ?or the 1ET'EE% operator, if OPERA%/ is Z0\\$A\Z and OPERA%/3 is Z0+\\8A\Z then the resultin- SG&

    fra-ment is

    SEC8E%T 1ET'EE% ]0] A%/ ]0+]= A%/ ;SEC8E%T4 1ET'EE% ]$A] A%/ ]8A]=

    i%> OPER$/D0:

    Specify an operand to use in the '!ERE clause.

    %> OPER$/D1:

    Specify a second operand to use (ith OPERATORBZ1ET'EE%Z.

    0> &at is t&e use of F/D F"E?*DV$" user e%it,

    F/D F"E?*DV$":

    $all this user e@it to populate fields for display. >ou pass the 2ey fle@fields data retrie:ed by the Fuery into this e@it from theformula column. 'ith this e@it you display :alues, descriptions and prompts by passin- appropriate to2en ;any one of 9A&"E,/ES$R#PT#O%, APRO8PT or &PRO8PT=.

    Synta%:

    ?%/ ?&EN#/9A& $O/EBZfle@field codeZ

  • 8/13/2019 Oracle Reports FAQ

    19/34

    APP&S!ORT%A8EBZapplication short nameZ /ATABZsource column nameZ X%"8BZstructure definin- source column)le@icalZY X/#SP&A>BZUA&&fle@field Fualifierse-ment numberVZY X#/#SP&A>BZUA&&fle@field Fualifierse-ment numberVZY XS!O'/EPSECBZU> %VZY X9A&"EBZoutput column nameZY X/ES$R#PT#O%BZoutput column nameZY XAPRO8PTBZoutput column nameZY

    X&PRO8PTBZoutput column nameZY XPA//E/9A&"EBZoutput column nameZY XSE$"R#T>BZcolumn nameZY

    i> .ODE:

    Specify the fle@field code for this report ;for e@ample, C&=. >ou call?&EN#/9A& multiple times, usin- a different $O/E, todisplay information for multiple fle@fields in one report.

    ii> $PP"5S3ORT5/$E:

    Specify the short name of the application that o(ns this fle@field ;for e@ample, SG&C&=.

    iii> D$T$:

    Specify the name of the field that contains the concatenated fle@field se-ment :alues retrie:ed by your Fuery.

    iv> /2:

    Specify the name of the source column or parameter that contains the fle@field structure information.

    v> D*SP"$C:

    The /#SP&A> parameter allo(s you to display se-ments that represent specified fle@field Fualifiers or specified se-mentnumbers, (here se-ment numbers are the order in that the se-ments appear in the fle@field (indo(, not the se-ment numberspecified in the /efine ey Se-ments form. The default is A&&, (hich displays all se-ments. Alternati:ely, you can specify a

    fle@field Fualifier name or a se-ment number. >ou can use these parameters as to--le s(itches by specifyin- them more thanonce. ?or e@ample, if you to display all but the first se-ment, you (ould specify

    /#SP&A>BZA&&Z

    /#SP&A>BZZ

    vi> *D*SP"$C:

    >ou use this parameter to tell ?&EN#/9A& (hat se-ments you used in your SE&E$T clause in the correspondin- ?&ENSG&call. ?&EN#/9A& needs this information to determine the format of ra( data retrie:ed by ?&ENSG&. >ou set #/#SP&A> to thesame :alue as your /#SP&A> parameter in your ?&ENSG& call. The default :alue is A&&, so if you used /#SP&A>BZA&&Z in?&ENSG&, you do not need to use #/#SP&A> here

    vii> S3ODEPSE# :

    S!O'/EPSECBZ%Z disables automatic display of depended upon se-ments. The default :alue is >.

    i%> V$"2E:

    Specify the name of the column in (hich you (ant to display fle@field :alues.

    %> DES.R*PT*O/ :

    Specify the name of the column in (hich you (ant to display fle@field descriptions.

  • 8/13/2019 Oracle Reports FAQ

    20/34

    %i> $PROPT:

    Specify the name of the column in (hich you (ant to display fle@field abo:e prompts.

    %ii> "PROPT:

    Specify the name of the column in (hich you (ant to display fle@field left prompts.

    %iii> P$DDED5V$"2E :

    Specify the name of the column in (hich you (ant to display padded fle@field :alues. The se-ment :alues are padded to these-ment siHe (ith blan2s.

    %iv> SE.2R*TC :

    Specify the name of the column into (hich fla- ZSZ (ill be placed if the se-ment :alues are secured. >ou then (rite lo-ic tohide or display :alues based on this fla-. This to2en is applicable only for se-ment :alues and does not apply to description, leftprompt or abo:e prompt./ote:The datatype of the column as specified by 9A&"E, /ES$R#PT#O%, APRO8PT and &PRO8PT is $!ARA$TER.

    0;> 3ow to implement Fle% fiel's in a Report,

    >ou use a t(ostep method to report on fle@field :alues. The first step creates the appropriate SG& statement dynamicallybased upon the user]s fle@field. The output of the first step is used as input to the second step. The second step formats this ra(data for display.

    Step 0 =.onstruction>:

    The first step reFuires you to include one or more le@ical parameters ;Oracle Reports :ariables that can be chan-ed atruntime= in your SG& statement. >ou call the user e@it ?%/ ?&ENSG& (ith different ar-uments to specify that part of the Fueryyou (ould li2e to build. The user e@it retrie:es the appropriate column names ;SG& fra-ment= and inserts it into the le@icalparameter at runtime before the SG& Fuery is e@ecuted. The Fuery then returns site\ and runtime\specific fle@field information.?or e@ample, suppose you ha:e the follo(in- Fuery

    SE&E$T M&EN#$A& alias, column

    ?RO8 table '!ERE M&EN#$A&3

    The preliminary calls to ?%/ ?&ENSG& replace :alues of &EN#$A&and &EN#$A&3 at e@ecution time (ith the SG&fra-ments. ?or e@ample, &EN#$A& becomes ZSEC8E%T]Qn]SEC8E%T3Z and &EN#$A&3 becomes ZSEC8E%T less than3Z ;assumin- the user]s fle@field is made up of t(o se-ments and the user reFuested that the se-ment :alue of SEC8E%T beless than 3=. The actual e@ecuted SG& Fuery mi-ht be

    SE&E$T SEC8E%T]Qn]SEC8E%T3 alias, column ?RO8 table '!ERE SEC8E%T less than 3

    The SG& statement for a user (ith a different fle@field structure mi-ht be SE&E$T SEC8E%T+]Qn]SEC8E%T4]Qn]SEC8E%T7 alias, column

    ?RO8 table '!ERE SEC8E%T4 less than 3

    'ith this step you can alter the SE&E$T, OR/ER 1>, CRO"P 1>, or '!ERE clause. >ou use this step to retrie:e all theconcatenated fle@field se-ment :alues to use as input to the user e@it ?%/ ?&EN#/9A& in step 3 ;described belo(=.

    >ou call this user e@it once for each le@ical parameter you use, and you al(ays call it at least once to -et all se-ments. Thisra( fle@field information is in an internal format and should ne:er be displayed ;especially if the se-ment uses a Zhidden #/Z:alue set=.

    Step 1 =Display>:

  • 8/13/2019 Oracle Reports FAQ

    21/34

    The second step reFuires you to call another user e@it, ?%/ ?&EN#/9A&, on a Zpost\recordZ basis. >ou create a ne(formula column to contain the fle@field information and include the user e@it call in this column. This user e@it determines thee@act information reFuired for display and populates the column appropriately. 1y usin- the fle@field routines the user e@it canaccess any fle@field information. "se this step for -ettin- descriptions, prompts, or :alues. This step deri:es the fle@fieldinformation from the already selected concatenated :alues and populates the formula column on a ro(byro( basis.

    >ou call ?%/ ?&EN#/9A& once for each record of fle@field se-ments.

    The fle@field user e@its for Oracle Reports are similar to their Oracle Application Object &ibrary ;usin- SG&K?orms=

    counterparts &OA/#/;R= or &OA//ES$ and POP#/;R= or POP/ES$L one to construct or load the :alues ;?&ENSG&=, the otherto display them ;?&EN#/9A&=. The to2en names and meanin-s are similar.

    )asic *mplementation Steps

    Step 0: .all F/D SR*/*T from your )efore Report Tri!!er

    >ou call the user e@it ?%/ SR'#%#T from your 1efore Report Tri--er. ?%/ SR'#%#T fetches concurrent reFuest informationand sets up profile options. >ou must include this step if you use any Oracle Application Object &ibrary features in your report;such as concurrent processin-=.

    Step 1: .all F/D SRE?*T from your $fter Report Tri!!er

    >ou call the user e@it ?%/ SR'EN#T from your After Report Tri--er. ?%/ SR'EN#T frees all the memory allocation done inother Oracle Applications user e@its. >ou must include this step if you use any Oracle Application Object &ibrary features in yourreport ;such as concurrent processin-=.

    Step 8: .all F/D F"E?S6" from t&e )efore Report Tri!!er

    >ou need to pass the concatenated se-ment :alues from the underlyin- code combinations table to the user e@it so that itcan display appropriate data and deri:e any descriptions and :alues from s(itched :alue sets as needed. >ou -et thisinformation by callin- the AO& user e@it ?%/ ?&ENSG& from the 1efore Report Tri--er. This user e@it populates the le@icalparameter that you specify (ith the appropriate column names)SG& fra-ment at run time. >ou include this le@ical parameter inthe SE&E$T clause of your report Fuery. This enables the report itself to retrie:e the concatenated fle@field se-ment :alues.>ou call this user e@it once for each le@ical to be set. >ou do not display this column in your report. >ou use this Zhidden fieldZ asinput to the ?%/ ?&EN#/9A& user e@it call. This user e@it can also handle multi\structure fle@field reportin- by -eneratin- adecode on the structure column. #f your report Fuery uses table joins, this user e@it can prepend your code combination table

    name alias to the column names it returns.

    SE&E$T M&EN#$A& alias, column

    1ecomes, for e@ample, SE&E$T SEC8E%T]Qn]SEC8E%T3 alias, column

    /ote:Oracle Reports needs the column alias to 2eep the name of column fi@ed for the le@icals in SE&E$T clauses. 'ithoutthe alias, Oracle Reports assi-ns the name of the column as the initial :alue of the le@ical and a discrepancy occurs (hen the:alue of the le@ical chan-es at run time.

    Step 9: Restrict report 'ata base' upon fle%fiel' values

    >ou call the user e@it ?%/ ?&ENSG& (ith 8O/EBZ'!EREZ from the 1efore Report Tri--er. This user e@it populates ale@ical parameter that you specify (ith the appropriate SG& fra-ment at run time. >ou include this le@ical parameter in the'!ERE clause of your report Fuery. >ou call this user e@it once for each le@ical to be chan-ed. #f your report Fuery uses tablejoins, you can ha:e this user e@it prepend your code combination table name alias to the column names it returns.

    '!ERE ta@fla- B ]>] and M&EN#$A& less than Mreportinput

    1ecomes, for e@ample, '!ERE ta@fla- B ]>] and T.se-ment4 less than 300 The same procedure can be applied for a !A9#%C clause.

    Step : Or'er by fle%fiel' columns

  • 8/13/2019 Oracle Reports FAQ

    22/34

    >ou call the user e@it ?%/ ?&ENSG& (ith 8O/EBZOR/ER 1>Z from the 1efore Report Tri--er. This user e@it populates thele@ical parameter that you specify (ith the appropriate SG& fra-ment at run time. >ou include this le@ical parameter in theOR/ER 1> clause of your report Fuery. >ou call this user e@it once for each le@ical to be chan-ed. #f your report Fuery usestable joins, you can ha:e this user e@it prepend your code combination table name alias to the column names it returns.

    OR/ER 1> column, M&EN#$A&

    1ecomes, for e@ample, OR/ER 1> column, se-ment, se-ment4

    Step ;:Display fle% fiel' se!ment values 'escriptions an' prompts

    $reate a ?ormula $olumn ;an Oracle Reports 6.0 data construct that enables you to call a user e@it=. $all the user e@it ?%/?&EN#/9A& as the ?ormula for this column. This user e@it automatically fetches more complicated information such asdescriptions and prompts so that you do not ha:e to use complicated table joins to the fle@field tables. Then you create a ne(field ;an Oracle Reports 6.0 construct used to format and display $olumns=, assi-n the ?ormula $olumn as its source, and addthis field to your report usin- the screen painter. >ou need to include this field on the same Repeatin- ?rame ;an Oracle Reports6.0 construct found in the screen painter that defines the freFuency of data retrie:ed= as the rest of your data, (here data couldbe actual report data, boilerplate, column headin-s, etc. The user e@it is called and fle@field information retrie:ed at thefreFuency of the Repeatin- ?rame that contains your field. #n the report data case, the user e@it is called and fle@field informationretrie:ed once for e:ery ro( retrie:ed (ith your Fuery. All fle@field se-ment :alues and descriptions are displayed left justified.Se-ment :alues are not truncated, that is, the /isplay SiHe defined in /efine ey Se-ments screen is i-nored. Se-ment :aluedescriptions are truncated to the description siHe ;if one is displayed= or the concatenated description siHe ;for concatenated

    se-ments= defined in the form.

    0@> 3ow 'o you 'isplay Fle%file' Se!ment vales Description an' Prompts on t&e report,

    $reate a ?ormula $olumn. $all the "ser E@it ?%/ ?&EN#/9A& as the formula in this column, This "ser e@its automaticallyfetches more complicated information such as description and prompts so that one does not has tot use complicated table joinsto the fle@ field tables.

    0A> &at is a )reak #roup an' &ow 'o you create one,

    A brea2 -roup is used to create a report in (hich an identical :alues in seFuential ro(s is printed only once for its relatedrecords.;i.e. A brea2 -roup di:ides a Fuery]s columns into sets=.

    0B> &at is t&e 'ifference in usin! a #roup Filter Vs a%imum Row,

    8a@imum Ro(s in the Guery Property sheet restricts the actual number of records fetched by the Fuery. A Croup ?ilterdetermines (hich records can be included or e@clude, after all the records ha:e been fetched by the Fuery.

    1 &ic& built-in is use' to call t&e re(uire' Report,

    R"%PRO/"$T

    10> .an you pass runtime parameters from reports to a #rap&ical 'isplay,

    >es you can pass

    11> Do you use bin' reference to replace reserve' wor's or clauses,

    >es

    18> &ic& property &an'les a situation w&ere an e%pecte' parameter is not passe' runtime,

    #nitial 9alue

    19> Do you use System Parameter DES/$E to specify t&e 'estination type for output,

    %O, use /ESTT>PE

  • 8/13/2019 Oracle Reports FAQ

    23/34

    1> Do you reference parts of SR packa!e in layout format tri!!ers or report level tri!!ers,

    >es, you do.

    1;> Do you t&ink t&at you can call contents of SR Packa!e form wit&in any of Developer Tools,

    %o, you do not.

    1@> &ic& SR packa!e is use' to apply specifie' formattin! attribute to t&e current layout ob7ect,

    SR'.SETATTR

    1A> *n a .&aracter o'e environment action wit& t&e &ost computer is continuous or not,

    #t is $ontinuous.

    1B> *n a )it ap o'e environment action wit& t&e &ost computer is continuous or not,

    #t is $ontinuous.

    8 Do you t&ink t&at reports store' in t&e 'atabase !enerally e%ecutes faster t&an t&ose store' in t&e file system,

    %o, Reports stored the file system -enerally e@ecutes faster than the report stored in the database.

    80> *s it a'visable to remove t&e re'un'ant frames in t&e layout,

    >es, it is.

    81> .an you 'etermine your own searc& pat&s for files calle' by Developer 1es it is.

    8A> Do you t&ink t&at it is possible for you as a 'eveloper to assi!n common properties to multiple ob7ects,

    >es

  • 8/13/2019 Oracle Reports FAQ

    24/34

    8B> &en you set packa!e break for an ob7ect an ob7ect t&at appears below it always move to t&e ne%t pa!es4 *s ittrue,

    %o, #t is false.

    9 &at are t&e cate!ories for report level ob7ects,

    /ata 8odel Objects, &ayout Objects and Parameter form.

    90> *s an e%ternal (uery a collection of P"+S6" source co'e t&at can be reference' by ot&er mo'ules,

    %o, #t is not.

    91> &ic& 'esi!n tool 'efines t&e appearance of an interface t&at allow t&e en' user o supply runtime values to report,

    Parameter form Editor.

    98> .an e%ternal (ueries be save' to t&e 'atabase,

    >es, >ou can.

    99> &at is containe' in t&e Database Ob7ects fiel's of t&e tables an' column names 'ialo! bo%,

    Table and 9ie( %ames.

    9> T&e aster Detail layout is t&e combination of w&ic& two layouts,

    ?orm and Tabular.

    9;> )y 'efault is t&ere a pa!e break after eac& recor' in t&e form 'efault layout,

    >es there is.

    9@> Does a break report always contain a break !roup,

    >es

    9A> *s it true t&at a break report 'ata mo'el is create' usin! at least two (ueries an' at least one !roup,

    %o, it is false.

    9B> *f you minimiGe t&e number of break columns in your break !roups will you minimiGe t&e number of columns t&atare a''e' to t&e or'er by clause,

    >es, you (ill.

    T&e link clause w&ic& (uery to be e%ecute' for eac& instance of t&e parent !roup,

    $hild Guery.

    0> 3ow many cursors 'o is reports &ave to open foe a two-(uery 'ata structure,

    T(o

    1> Does 'efault columns referre' to as common columns,

    %o they are not.

  • 8/13/2019 Oracle Reports FAQ

    25/34

    8> Default columns referre' to as Place 3ol'er columns,

    %o they are not.

    9> Does a formula column perform user-'efine' computation on anot&er columns 'ata,

    >es

    > &ic& fiel' in summary columns Property s&eet s&ows t&e calculation to be performe',

    ?unction ?ield.

    ;> *f a Place&ol'er columns 'ata type is "O/# or "O/#RO can you e'it t&e wi't& file',

    >es you can.

    @> &at anc&ors,

    &in2s one or more layout objects to-ether.

    A> Does (ueries are create' by 'efault,

    %o

    B> &ere you can restrict ma%imum number of rows,

    8a@imum Ro(s property in the Guery Property Sheet.

    ; Oracle reports create one !roup for eac& (uery4 *s it true,

    >es

    ;0> .an you 'efine a Summary .olumn at a !roup "evel,

    >es (e can.

    ;1> Does links are create' by 'efault,

    %o

    ;8> )ecause of t&e creation of "inks t&e relations&ip between w&ic& two ob7ects is create',

    Croup and Guery.

    ;9> To pro'uce control break reports to pro'uce ma%imum reports an' to summariGe 'ata at interme'iate kevel w&ic&ob7ect is nee',

    Croup Object.

    ;> *f you c&an!e a (uery name after t&e !roup &as been create' can you c&an!e t&e name of t&e !roup,

    %o, >ou cannot.

    ;;> *f we take one (uery e%: select '4i' e4salry from emp e 'ept ' w&ere e4'ept5i' H '4i' or'er by salary $n' if wecreate break !roup wit& '4i'4 &at will &appen,

    !ere order by clause is modified just li2e order by l, salary.

  • 8/13/2019 Oracle Reports FAQ

    26/34

    ;@> $ link 'efines a Parent+.&il' relations&ip between a !roup an' a (uery4 *s it true, *f yes via w&ic& two keys,

    Primary and ?orei-n

    ;A> &ic& term in S6" is relate' to IlinkJ in reports,

    oin

    ;B> .an you create a link from c&il' (uery to parent (uery,

    %o, al(ays creates a lin2 from parent Fuery to child Fuery.

    @ &at is )in' reference,

    A bind reference replaces a sin-le :alue or an e@pression.

    @0> &at is "e%ical reference,

    A &e@ical reference replaces any part of a select statement such a s column name, from clause, (here clause order byclause.

    @1> *n w&ic& case parameter is create' by 'efault,

    #n case of bind reference parameter is created by default.

    @8> )in' reference is use' to replace w&ic& clause,

    '!ERE, CRO"P 1>, OR/ER 1>, !A9#%C, $O%%E$T 1>, and START '#T!.

    @9> "e%ical reference is use' to replace w&ic& clause,

    SE&E$T, ?RO8, '!ERE, CRO"P 1>, OR/ER 1>, !A9#%C, $O%%E$T 1>, and START '#T!.

    @> &at is a 2ser Parameter,

    #t is an object that you can hold :alues that user can chan-e at runtime.

    @;> &at are t&e properties of Parameter,

    /atatype, (idth, #nput 8as2, #nitial 9alue and 9alidation Tri--er.

    @@> &at is t&e function of Restrict t&e list of pre-'etermine' values,

    #t is used to determine (hether to pre:ent users from enterin- any :alue not included in your list.

    @A> *f you unc&eck t&e restricte' values c&eckbo% w&at will &appen,

    "ser can also enter :alues to the &ist 1o@.

    @B> Does Oracle Reports allow D" operation in Format Tri!!er,

    %o

    A &en you use #roup Filter in Data o'el,

    -roup filter is a P&)SG& function that determines (hich records to include in a -roup, if the ?ilter Type property is P&)SG&.The function must return a boolean :alue ;TR"E or ?A&SE=. /ependin- on (hether the function returns TR"E or ?A&SE, the

  • 8/13/2019 Oracle Reports FAQ

    27/34

    current record is included or e@cluded from the report. >ou can access -roup filters from the Object %a:i-ator, the PropertyPalette ;the P&)SG& ?ilter property=, or the P&)SG& Editor.

    #roup Filter restrictions:

    Croup filters cannot be added to -roups if ?ilter Type is ?irst or &ast.

    Croup filters cannot be added to crossproduct -roups.

    #n a -roup filters, you can read the :alues of Report 1uilder columns and parameters of the correct freFuency ;loo2 at

    the rule belo(=, but you cannot directly set their :alues. ?or e@ample, you can use the :alue of a parameter called$O"%T in a condition ;e.-., #? $O"%T B 0=, but you cannot directly set its :alue in an assi-nment statement

    ;e.-., $O"%T B 0=. %ote also that the use of P&)SG& -lobal :ariables to indirectly set the :alues of columns or

    parameters is not supported. #f you do this, you may -et unpredictable results. >ou also cannot reference any pa-edependent columns ;i.e., Reset At of Pa-e= or columns that rely on pa-edependent columns in a -roup filter.

    The function that you enter for a -roup filter can only depend upon the follo(in- columns

    a database column o(ned by the -roupIs Fuery or a Fuery abo:e it in the data model hierarchy

    $omputed columns ;formulas or summaries= that depend on unrelated Fueries ;i.e., computed columns that do not

    depend upon columns in the -roup, the -roupIs ancestors, or the -roupIs descendants=

    A0> &y you nee' to restrict recor's in a specific !roup,

    A1> &enever a w&ere clause in ( (uery is not applicable w&ic& 'ata mo'el tri!!er is 2seful,

    A Croup ?ilter.

    A8> Do you a'' a filter to a atri% .ross Pro'uct !roup,

    %o, you cannot.

    A9> $ atri% Report is also referre' to as I.ROSS T$)J report4 *s it True,

    >es

    A> 3ow many types of atri% Reports are t&ere, Tell me t&eir names,

    There are 5 types. Simple 8atri@, %ested 8atri@, 8ulti Guery 8atri@ (ith 1rea2 ad 8atri@ 1rea2.

    A;> *f you buil' a atri% report wit& only one (uery &ow many !roups are re(uire in a''ition to one create' by 'efault,

    4 Croups are reFuired.

    A@> 3ow many types of (uery structures are t&ere, Tell me t&e /ames,

    T(o. They are OneFuery8atri@ and 8ultiFuery8atri@.

    AA> atri% reports are buil' wit& for or more !roups4 *s it True,

    >es

    AB> &at is t&e 'ifference between /este' atri% an' a atri% )reak,

    #n case of 8atri@ 1rea2, one or more -roups are a parent of the cross product -roup. And in case of %ested matri@, three ormore -roups are surrounded by he cross product -roup.

    B &at are t&e components of a Report )uil'er,

    Object %a:i-ator, &ayout 8odel, /ata 8odel, Property Pallet and P&)SG& Editor.

  • 8/13/2019 Oracle Reports FAQ

    28/34

    B0> &at are t&e E%tension of t&e report,

    rdf \ 1inary Source ?ile. .rep \ 1inary E@ecutable ?ormat. .re@ \ Te@t ?ormat. .tdf \ report template binary file.

    >ou can chan-e .rdf and .re@ to .rep usin- R'$O%60 or -o to ?ile Admin $on:ert.

    B1> .an you run t&e report wit&out a parameter forms,

    >es, #t is possible to run a report (ithout the parameter form by settin- the PARA8 :alue to %"&&. E@ addparamerter;plid, ^PARA8?OR8],TENTPARA8ETER,%"&&=L

    B8> &at ate Data o'el an' "ayout o'el,

    The /ata retrie:ed for a report is defined in /ata 8odel and style of the report is defined in &ayout 8odel.

    B9> &at are t&e )ack !roun' processes in Oracle an' w&at are t&ey,

    This is one of the most freFuently as2ed Fuestions. There are basically * Processes but in a -eneral system (e need tomention the first fi:e bac2-round processes. They do the house 2eepin- acti:ities for the Oracle and are common in any

    system.

    The :arious bac2-round processes in oracle are

    /ata 1ase 'riter ;/1'R= /ata 1ase 'riter 'rites 8odified bloc2s from /atabase buffer cache to /ata ?iles. This is

    reFuired since the data is not (ritten (hene:er a transaction is committed.

    &o-'riter ;&C'R= &o-'riter (rites the redo lo- entries to dis2. Redo &o- data is -enerated in redo lo- buffer of

    SCA. As transaction commits and lo- buffer fills, &C'R (rites lo- entries into a online redo lo- file.

    System 8onitor ;S8O%= The System 8onitor performs instance reco:ery at instance startup. This is useful for

    reco:ery from system failure

    Process 8onitor ;P8O%= The Process 8onitor performs process reco:ery (hen user Process fails. Pmon $lears

    and ?rees resources that process (as usin-.

    $hec2Point ;$PT= At Specified times, all modified database buffers in SCA are (ritten to data files by /1'R at

    $hec2points and "pdatin- all data files and control files of database to indicate the most recent chec2point Achie:es ;AR$!= The Archi:er copies online redo lo- files to archi:al storal (hen they are busy.

    Reco:eror ;RE$O= The Reco:eror is used to resol:e the distributed transaction in net(or2

    /ispatcher ;/nnn= The /ispatcher is useful in 8ulti Threaded Architecture

    &c2n 'e can ha:e up to 0 loc2 processes for inter instance loc2in- in parallel sFl.

    B> 3ow many types of S(l Statements are t&ere in Oracle,

    There are basically 6 types of sFl statments.They are

    /ata /efinition &an-ua-e ;//&= The //& statements define and maintain objects and drop objects.

    /ata 8anipulation &an-ua-e ;/8&= The /8& statements manipulate database data.

    Transaction $ontrol Statements 8ana-e chan-e by /8&

    Session $ontrol "sed to control the properties of current session enablin- and disablin- roles and chan-in- e.-.

    Alter Statements, Set Role.

    System $ontrol Statements $han-e Properties of Oracle #nstance .e.-. Alter System.

    Embedded SFl #ncorporate //&, /8& and T.$.S in Pro-rammin- &an-ua-e. e.-. "sin- the SFl Statements in

    lan-ua-es such as I$I, Open, ?etch, e@ecute and close

    B;> &at is a Transaction in Oracle,

    A transaction is a &o-ical unit of (or2 that compromises one or more SG& Statements e@ecuted by a sin-le "ser. Accordin-to A%S#, a transaction be-ins (ith first e@ecutable statement and ends (hen it is e@plicitly committed or rolled bac2.

  • 8/13/2019 Oracle Reports FAQ

    29/34

  • 8/13/2019 Oracle Reports FAQ

    30/34

    Stored Procedures are Procedures that are stored in $ompiled form in the database. The ad:anta-e of usin- the storedprocedures is that many users can use the same procedure in compiled and ready to use format.

    BB> 3ow many *nte!rity Rules are t&ere an' w&at are t&ey,

    There are Three #nte-rity Rules. They are as follo(s

    Entity #nte-rity Rule The Entity #nte-rity Rule enforces that the Primary 2ey cannot be %ull.

    ?orei-n ey #nte-rity Rule The ?#R denotes that the relationship bet(een the forei-n 2ey and the primary 2ey has

    to be enforced. 'hen there is data in $hild Tables the 8aster tables cannot be deleted.

    1usiness #nte-rity Rules The Third #nte-rity rule is about the comple@ business processes (hich cannot be

    implemented by the abo:e 3 rules.

    0

  • 8/13/2019 Oracle Reports FAQ

    31/34

    0 3ow 'o u implement t&e *f statement in t&e Select Statement

    'e can implement the if statement in the select statement by usin- the /ecode statement. E.-. select /E$O/E ;E8P$AT,II,I?irstI,I3I,ISecondI%ull=L !ere the %ull is the else statement (here null is done.

    0 3ow many types of E%ceptions are t&ere,

    There are 3 types of e@ceptions. They are

    System E%ceptions

    E.-. 'hen nodatafound, 'hen toomanyro(s

    2ser Define' E%ceptions

    e.-. 8ye@ception e@ception'hen 8ye@ception then

    0 &at are t&e inline an' t&e precompiler 'irectives,

    The inline and precompiler directi:es detect the :alues directly

    0 3ow 'o you use t&e same lov for 1 columns,

    'e can use the same lo: for 3 columns by passin- the return :alues in -lobal :alues and usin- the -lobal :alues in the code

    0 3ow many minimum !roups are re(uire' for a matri% report,

    The minimum number of -roups in matri@ report is 5

    0 &at is t&e 'ifference between static an' 'ynamic lov

    The static lo: contains the predetermined :alues (hile the dynamic lo: contains :alues that come at run time

    0 &at are snap s&ots an' views,

    Snapshots are mirror or replicas of tables. 9ie(s are built usin- the columns from one or more tables. The Sin-le Table9ie( can be updated but the :ie( (ith multi table cannot be updated

    00 &at are t&e OOPS concepts in Oracle4

    Oracle does implement the OOPS concepts. The best e@ample is the Property $lasses. 'e can cate-ories the properties bysettin- the :isual attributes and then attach the property classes for the objects. OOPS supports the concepts of objects andclasses and (e can consider the property classes as classes and the items as objects

    000> &at is t&e 'ifference between can'i'ate key uni(ue key an' primary key

    $andidate 2eys are the columns in the table that could be the primary 2eys and the primary 2ey is the 2ey that has beenselected to identify the ro(s. "niFue 2ey is also useful for identifyin- the distinct ro(s in the table.

    001> &at is concurrency,

    $oncurrency is allo(in- simultaneous access of same data by different users. &oc2s useful for accessin- the database are

    E%clusive

    The e@clusi:e loc2 is useful for loc2in- the ro( (hen an insert, update or delete is bein- done. This loc2 should not beapplied (hen (e do only select from the ro(.

  • 8/13/2019 Oracle Reports FAQ

    32/34

    S&are lock

    'e can do the table as Share &oc2 as many share loc2s can be put on the same resource.

    Privile!es an' #rants

    Previle!es are the ri-ht to e@ecute a particular type of SG& statements.e.-. Ri-ht to $onnect, Ri-ht to create, Ri-ht to resource.

    #rants are -i:en to the objects so that the object mi-ht be accessed accordin-ly. The -rant has to be -i:en by the o(ner of theobject.

    008> &at is Table Space Data Files Parameter File .ontrol Files,

    Table Space:

    The table space is useful for storin- the data in the database. 'hen a database is created t(o table spaces are created.

    System Table Space:

    This data file stores all the tables related to the system and dba tables

    2ser Table Space:

    This data file stores all the user related tables'e should ha:e separate table spaces for storin- the tables and inde@es so that the access is fast.

    Data Files:

    E:ery Oracle /ata 1ase has one or more physical data files. They store the data for the database. E:ery data file isassociated (ith only one database. Once the /ata file is created the siHe cannot chan-e. To increase the siHe of the databaseto store more data (e ha:e to add data file.

    Parameter Files:

    Parameter file is needed to start an instance. A parameter file contains the list of instance confi-uration parameterse.-.dbbloc2buffers B +00

    dbname B ORA dbdomain B u.s.acme lan-

    .ontrol Files:

    $ontrol files record the physical structure of the data files and redo lo- files They contain the /b name, name and location ofdbs, data files ,redo lo- files and time stamp.

    P&ysical Stora!e of t&e Data

    The finest le:el of -ranularity of the data base is the data bloc2s.

    Data )lock

    One /ata 1loc2 correspond to specific number of physical database space

    E%tent:

    E@tent is the number of specific number of conta-ious data bloc2s.

  • 8/13/2019 Oracle Reports FAQ

    33/34

    Se!ments:

    Set of E@tents allocated for E@tents. There are three types of Se-ments /ata Se-ment %on $lustered Table has data se-ment data of e:ery table is stored in cluster data se-ment #nde@ Se-ment Each #nde@ has inde@ se-ment that stores data Roll 1ac2 Se-ment Temporarily store IundoI information

    009> &at are t&e Pct Free an' Pct 2se',

    Pct ?ree is used to denote the percenta-e of the free space that is to be left (hen creatin- a table. Similarly Pct "sed isused to denote the percenta-e of the used space that is to be used (hen creatin- a table E-. Pctfree 30, Pctused 50

    00> &at is Row .&ainin!,

    The data of a ro( in a table may not be able to fit the same data bloc2. /ata for ro( is stored in a chain of data bloc2s.

    00;> &at is a 1 P&ase .ommit,

    T(o Phase commit is used in distributed data base systems. This is useful to maintain the inte-rity of the database so thatall the users see the same :alues. #t contains /8& statements or Remote Procedural calls that reference a remote object. Thereare basically 3 phases in a 3 phase commit.

    Prepare P&ase:Clobal coordinator as2s participants to prepare

    .ommit P&ase:$ommit all participants to coordinator to Prepared, Read only or abort Reply

    00@> &at is t&e 'ifference between 'eletin! an' truncatin! of tables,

    /eletin- a table (ill not remo:e the ro(s from the table but entry is there in the database dictionary and it can be retrie:ed1ut truncatin- a table deletes it completely and it cannot be retrie:ed.

    00A> &at are mutatin! tables,

    'hen a table is in state of transition it is said to be mutatin-. e- #f a ro( has been deleted then the table is said to bemutatin- and no operations can be done on the table e@cept select.

    00B> &at are .o'' Rules,

    $odd Rules describe the ideal nature of a R/18S. %o R/18S satisfies all the 3 codd rules and Oracle Satisfies of the3 rules and is the only Rdbms to satisfy the ma@imum number of rules.

    01 &at is /ormaliGation,

    %ormaliHation is the process of or-aniHin- the tables to remo:e the redundancy. There are mainly + %ormaliHation rules.

    . 0 /ormal Form:A table is said to be in st %ormal ?orm (hen the attributes are atomic3. 1 /ormal Form:A table is said to be in 3nd %ormal ?orm (hen all the candidate 2eys are dependant on the primary

    2ey

    4. 8r' /ormal Form:A table is said to be third %ormal form (hen it is not dependant transiti:ely

    010> &at is t&e Difference between a post (uery an' a pre (uery

    A post Fuery (ill fire for e:ery ro( that is fetched but the pre Fuery (ill fire only once.

    011> Deletin! t&e Duplicate rows in t&e table

    'e can delete the duplicate ro(s in the table by usin- the Ro(id.

  • 8/13/2019 Oracle Reports FAQ

    34/34

    018> .an 2 'isable 'atabase tri!!er, 3ow,

    >es. 'ith respect to table A&TER TA1&E TA1&E X /#SA1&E alltri--er Y

    019> &at is a pseu'o column, /ame t&em,

    A pseudocolumn beha:es li2e a table column, but is not actually stored in the table. >ou can select from pseudocolumns,but you cannot insert, update, or delete their :alues. This section /escribes these pseudocolumns

    $"RR9A&, %ENT9A& , &E9E& , RO'#/ , RO'%"8

    01>3ow many columns can table &ave,

    The number of columns in a table can ran-e from to 3+5.

    01;> *s space ac(uire' in blocks or e%tents,

    #n e@tents.

    01@> &at is clustere' in'e%,

    #n an inde@ed cluster, ro(s are stored to-ether based on their cluster 2ey :alues . $an not apply for !AS!.

    01A> &at are t&e 'ata types supporte' )y oracle =*/TER/$">,

    9archar3, %umber, $har, 8&S&A1E&.

    01B> &at are attributes of cursor,

    J?O"%/ , J%OT?O"%/ , J#SOPE%,JRO'$O"%T

    08 .an you use select in FRO clause of S6" select,

    >es