System Parameters Default System Parameters are created for every report. They are used to modify/control the report output and printing activity. User Parameters User Parameters are report specific and are used to pass information to a report at runtime. What is ANCHOR? A) These are used to determine the vertical and horizontal positioning of the child object relative to its parent. Tool which will be used in the layout model editor to destroy the field horizontally or vertically whenever field gets null value. When we have multiple fields in layout model editor if any one of the field gets null value the next field should gets automatically adjusted in that place that time we will use anchor. Oracle Reports Builder Tools Oracle Reports Builder consists of Object Navigator Property Palette Data Model Editor Layout Model Editor Parameter Form Editor Object Navigator The Object Navigator shows a hierarchical view of objects in the report. Property Palette A Property Palette is a window that displays the settings for defining an Oracle reports object. DATA MODEL The Data Model editor is the workspace where you select and define data for report. We are essentially calling in column and table definitions from the database Queries Queries are SQL Select statements that fetch data from the oracle database. These statements are fired each time the report is run. Groups Groups determine the hierarchy of data appearing in the report and are primarily used to group columns selected in the query. Oracle report automatically creates a group for each query. Data Columns Data columns contain the data values for a report. What are formula, summary and placeholder columns? 1) Formula column: It is a PL/SQL block which we will user to calculating a value based on our business logic and it will return one value. 2) Summary column: It is a PL/SQL block which we will use to print the result of aggregate functions like SUM, AVG and COUNT either at page level or at report level.
3) Placeholder column: It is a column which will have the data type and data value. It works like global variable in reports. If we want to return more than one value then we will use placeholder column in formula column. Data Link Data links are used to establish parent-child relationships between queries and groups via column matching. LAYOUT EDITOR The Layout Editor is the workspace where you define the positions of the Layout objects as they should appear in the report output. What is frame? A) Frame is the place in the layout editor where we place an object to display only once in the report output. What is repeating frame A) Repeating Frame is the place in the layout editor where we place an object to display repeatedly in the report output. Fields A) Fields acts as placeholders for columns values. They define the formatting attributes for all columns displayed in the report. Boilerplate A) Boilerplate consists of text and graphics that appear in a report each time it is run. Parameter Form Editor A) Parameter form is a runtime form which is used to accept inputs from the user. Report Triggers Report triggers enable execution of PL/SQL functions at specific time during execution and formatting of report. What are action, format and validation triggers? A) ACTION TRIGGERS: Action triggers are PL/SQL procedures executed whenever button is selected in the runtime preview. EX: Calling a report FORMAT TRIGGERS: Format triggers are PL/SQL functions which will be use to display layout object in the report output. The return type is always true or false. EX: No Data Found We will write a validation trigger for this boiler plate text. VALIDTION TRIGGERS: We will use to validate the LOV values in the parameter form. What are Report Triggers? A) Report triggers are 5 types. They are
1) Before parameter form. 2) After parameter form. 3) Before report trigger. 4) Between pages. 5) After Report trigger Before Parameter Form Fires before the Runtime Parameter Form are displayed. Can access the PL/SQL global variables, report level columns and manipulate accordingly. After Parameter Form Fires after the Runtime Parameter form are displayed. Used to validate the parameter values. Before Report Fires before the report is executed but after the queries is parsed and data is fetched.
Between Pages Fires before each page of the report are formatted, except the very first page.
This page is used to customize page formatting.
After Report Fires after report output is sent to a specified destination.
What is the difference between after parameter form and before report trigger? A) After parameter form will fire at Parsed time. Before report trigger will fire at execution time. What are Bind and Lexical parameters? Bind parameter: Bind parameter is a variable which we will use to pass the value. If any variable is proceeding with µ:¶ in a query is called as bind variable. Lexical parameters: Lexical parameter is a parameter which can be used inside of a query. These parameters can be used any where inside of query. EX: select, from, where, order by etc... If any variable is proceeding with µ&¶ in a query is called as Lexical variable. What are system parameters? These are the system parameters. 1) Background 2) Currency 3) Copies 4) Decimal 5) Desformat 6) Desname 7) Destype 8) Mode 9) Orientation 10) Destintion How to run a report from a report?
A) We will place button in the repeating frame of layout editor. And in that button code we will write code as follows Srw.run_report (µpath of .rdf file¶, paramform = no, dept = ³µ||:deptno||¶´¶); Save the report and generate it. What is user exit? A) User exit is a program which will transfer the control from report execution to another third generation language program it will fetch the required data and will complete the remaining report execution process. What is srw.do_sql, srw.message, srw.reference, srw.program_abort? A) Srw.do_sql: It is used to execute DDL commands in the reports. Syntax: srw.do_sql (µcreate table tname¶); Srw.message: It is used to display message in reports. Srw.reference: It is used to refer the variables in formula columns. Srw.program_abort: It is used to stops report execution and raises the exceptions. Rep-1419 PL/SQL program aborted How to execute DDL commands in reports? A) We will execute the DDL commands in reports by using the following user exit. Srw.do_sql (µcreate table tname ()¶); How to change the layout dynamically? A) A layout can be changed dynamically by passing the parameters. How to implement lexical parameters in reports? A) Use the µ&¶ before any parameter is called as lexical parameters. We can parameters in any part of the query Ex: select, where, order by
use these
What is the report global variable? A) Place holder column is the report global variable. We can return more than one value by using place holder column. What is matrix report? A) Display information row, column and in cell format The report output is 10 pages then how many times between pages report trigger will fire? A) It will fire 8 times. Between pages report trigger will not fire for 1st and last page. Report will not be having any parameters then, before parameter and after parameter triggers will fire or not? A) Yes
What are Confined Mode and Flex Mode? Confined mode allows objects to be locked into the place in the layout. Objects are maintained within their containers. CONFINE mode is not for a specific object, but applies to all objects on the layout when it is enabled (locked).When it is turned off (unlocked), you are allowed to move an object outside its surrounding frame. When it is turned on (locked), you are unable to move an object outside its surrounding frame. This is to prevent unnecessary 'Frequency Errors'. Flex mode preserves the layout structure while allowing expanding and shrinking of the layout. FLEX mode, when enabled, allows surrounding frames to grow as an object is resized or moved. Only one object at a time can be moved either vertically or horizontally, not diagonally. What is a Token? Token is used to attach a bind variable to a report parameter while registering the report as concurrent program. What is the use of µSend to Back¶ and µBring to Front¶? To change the order in which objects are layered on top of each other. Send to Back to move the object behind all other objects. Bring to Front to move the object in front of all other objects. How do you fix a performance problem in a Report? Check Report main query and fine tune it. Create indexes on columns used in where condition (eliminate full table scan) Enable Trace (set trace on in before report and set trace off in after report) Before Report: srw.do_sql ('alter session set sql_trace=true'); After Report: srw.do_sql ('alter session set sql_trace=false'); Trace file will be generated at location: Select value from v$parameter where name = 'user_dump_dest'; To better see execution plans in a trace file, you need to format the generated trace file with tkprof statement. What is the difference between Bitmap and Character based reports? Explain in detail. Bitmap vs. Character-Mode Report Design Here is an example to help explain how Oracle Reports are designed and printed in both the bitmap and character-mode environments. Assume you wish to print "Cc" where "C" is a different font and a larger point size than "c" and is in boldface type (where "c" is not). In Oracle Reports Designer, bitmap mode, you can make "C" bold and in a different font and point size than "c". This is because you are generating postscript output. Postscript is a
universal printer language and any postscript printer is able to interpret your different design instructions. In Oracle Reports Designer, character mode, the APPLICATIONS STANDARDS REQUIRE the report to be designed in ONE FONT/ ONE CHARACTER SIZE. Character mode reports generate ASCII output. In ASCII you cannot dynamically change the font and character size. The standard is in effect so a report prints as identically as possible from both conventional and postscript printers. Bitmap vs. Character-Mode Report Printing These sequences contrast the two printing environments. In postscript, "C" can be in a different font and point size than "c". Both or either could also be bold, for example. In ASCII, "C" must be in the same font and character size as "c". Both or either could also be bold, for example. How can you find out View is updatable or not? A) We can find out the view is updatable or not by seeing the definition of that view. If the view is create base on a single table and it doesn't contain any aggregate functions. Then that view is updateable If the view is created based on a join statement, or it contains any aggregate functions then that view is not updateable. What are the types of views? A) There are 4 types of views 1) Inline view: When we write a query inside of another query from clause then we will call it as inline view. 2) Updateable view: if the view is created from a single table and if doesn't contain any aggregate functions then that view is called as updateable view. 3) Non updateable view: if the view is created from two or more tables and if it contains any aggregate functions, joins, union commands then that view is called as non updateable view. 4) Materialized view: MATERIALISED view definition includes any no of aggregate functions as well as any no of joins in several ways. Behaves like an index. It is used to increase the query execution performance. What are the snapshots and materialized views? A) Snap shots: a snapshot is a replication of master table from a single point-in-time. Snapshots are updated by one or more master tables via individual batch updates are known as refresh. MATERIALIZED VIEWS: materialized view will be created to access the base table information and it is not possible to do DML operations on that The validations of the base table will be reflected in two ways Automatically using COMMITT option. Manually executing the refresh method. SYNTAX: CREATE MATERIALIZED VIEW MVNAME REFRESH [FAST/COMPLETE] ON [COMMIT/DEMAND] AS SELECT STMT;