Vous êtes sur la page 1sur 6

Oracle Reports Q&A

Oracle Reports Q & A

Oracle Reports:
1. What is Report Triggers? Ans: Report triggers are executable PL/SQL functions at specific times during the Report execution. 2. How many report triggers are available? What are they? Ans: Five Report Triggers are there a. Before Parameter Form b. After Parameter Form c. Before Report d. Between Pages e. After Report (Maintain the Report Trigger Sequence) 3. Discuss the Firing Sequence and its characteristics of Report Triggers? Ans: (1) Before Parameter Form Fires before the Runtime Parameter Form is displayed. From this trigger, you can access and change the values of parameters, PL/SQL global variables, and report-level columns. (Note: If the Runtime Parameter Form is suppressed, this trigger still fires). (2) After Parameter Form Fires after the Runtime Parameter Form is displayed. From this trigger, you can access parameters and check their values or other data. (Note: Columns from the data model are not accessible from this trigger. If the Runtime Parameter Form is suppressed, the After Parameter Form trigger still fires). (3) Before Report Fires before the reports is executed but after queries are parsed and data is fetched. (4) Between Pages Fires before each page of the report are formatted, except the very first page. This trigger can be used for customized page formatting. (Note: In the Previewer, this trigger only fires the first time that you go to a page. If you subsequently return to the page, the trigger does not fire again). (5) After Report Fires after you exit the Previewer, or after report output is sent to a specified destination, such as a file, a printer, or an Email. This trigger can be used to clean up any initial processing that was done, such as deleting tables. (Note: However, that this trigger always fires, whether or not your report completed successfully). 4. What are the Other Triggers available in Oracle Reports? Ans: Apart from report triggers we have 3 other triggers a. Validation Triggers b. Format Triggers c. Action Triggers 5. Discuss the characteristics of Other Triggers in Oracle Reports? Ans: (1) Validation Triggers Validation triggers are PL/SQL functions that are executed when parameter values are specified on the command line and when you accept the Runtime Parameter Form. (Note: Validation trigger may fire twice when you execute the report). Validation triggers are also used to validate the Initial Value property of the parameter.

Oracle Reports Q&A

(2) Format Triggers Format Triggers are PL/SQL functions executed before the object is formatted. The trigger can be used to dynamically change the formatting attributes of the object. (3) Action Triggers Action Triggers are PL/SQL procedures executed when a button is selected in the Previewer. The trigger can be used to dynamically call another report (drill down) or execute any other PL/SQL. 6. What are various types of parameters? Ans: There are two types of parameters: a. Default Parameters (system parameters) b. User Defined Parameters (bind and lexical parameters) 7. Name few System parameters? Ans: Below is the list of few System Parameters. a. Copies b. Currency c. Decimal d. Orientation 8. What is System Parameters? Name Few and its uses? Ans: These are built-in parameters provided by Oracle Reports. Below is the list of few System Parameters. a. COPIES: Is the number of report copies that should be made when the report is printed. b. CURRENCY: Is the symbol for the currency indicator (e.g., "$"). c. DECIMAL: Is the symbol for the decimal indicator (e.g., "."). d. MODE: Is whether the report should run in character mode or bitmap. e. ORIENTATION: Is the print direction for the report (landscape, portrait, default). f. PRINTJOB: Is whether the Print Job dialog box should appear before the report is run. g. THOUSANDS: Is the symbol for the thousand's indicator (e.g., ","). 9. What is BIND Parameter? Ans: Bind references (or bind variables) are used to replace a single value in SQL or PL/SQL. Specifically, bind references may be used to replace expressions in SELECT, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH clauses of queries. Bind references may not be referenced in FROM clauses or in place of reserved words or clauses. It referenced with prefix colon (:). 10. What is LEXICAL Parameter? Ans: Lexical references are placeholders for text that you embed in a SELECT statement. You can use lexical references to replace the clauses appearing after SELECT, FROM, WHERE, GROUP BY, ORDER BY, HAVING, CONNECT BY, and START WITH. It referenced with prefix ampersand (&) Note: Before you create your query, define a column or parameter in the data model for each lexical reference in the query. For columns, you must enter Value if Null, and, for parameters, you must enter Initial Value. Report Builder uses these values to validate a query with a lexical reference. 11. How many types of columns are there in Oracle Reports 6i? What are they? Ans: There are three types of columns in Oracle Report 6i. They are

Oracle Reports Q&A a. Placeholder Column b. Formula Column c. Summary Column

12. How many different layouts are available in Oracle Reports 6i? What are they? Ans: There are eight different layout formats are available. They are a. Tabular b. Form Like c. Mailing Label d. Form Letter e. Group Left f. Group Above g. Matrix h. Matrix with group 13.What is a Placeholder Column in Report? Ans: Placeholder columns are used to store a value for a variable or a global variable in data model by specifying required data type. Note: Although Placeholders allow PL/SQL to be written within them, they cannot be self-populated, their value must be set by an external Program Unit, and any attempts at self-population will result in a runtime compilation error. However the Formula assigned to the Placeholder must return a value. 14.What is a Summary Column in Report? Ans: A Summary column performs an aggregate computation on another columns data. 15.What is a Formula Column in Reports? Ans: A formula column performs a user-defined computation on another column(s) data, including placeholder columns. (Note: formula columns should not be used to set values for parameters). 16.What is Confine Mode? Ans: On (Default): child objects cannot be moved outside their enclosing parent objects. Off: child objects can be moved outside their enclosing parent objects. 17. What is Flex Mode? Ans: On: parent borders "stretch" when child objects are moved against them. Off (Default): parent borders remains fixed when child objects are moved against them. 18. What is User Exit in Oracle Reports? Ans: User exits provides a way to pass control from Report Builder to a program we have written, which performs some function, and then returns control to Report Builder. 19. Name few User Exits in reports? Ans: Few User Exits available in Oracle Report are a. SRW.USER_EXIT b. SRW.DO_SQL c. SRW.MESSAGE d. SRW.REFERENCE

Oracle Reports Q&A 20. What does SRW stands for? Ans: SRW stands for SQL Report Writer. 21. What are the different sections in the Layout? Ans: There are 3 sections in Layout model. They are a. Header b. Main c. Trailer 22. How do you print Bar Code in the reports? Ans: By Installing the Bar Code font and using the Chart Field in the Layout. 23.What is ANCHOR in Reports? Ans: Anchors are used to determine the vertical and horizontal positioning of a child object relative to its parent. (Or) An anchor defines the relative position of an object to the object to which it is anchored. 24. What is Boilerplate? Ans: Boilerplate is any text or graphics that appear in a report every time it is run. A boilerplate object is owned by the object surrounding it. 25. How do you mail the output of a report? Ans: You can use following methods to mail the output of a report. a. Use UTL_SMTP (refer to Scripts tab for more details) b. Use MAILX called in a shell script registered as a concurrent program with parameters File name and path. 26. What is the Horizontal or Vertical sizing property (Elasticity) of objects? Ans: Horizontal or Vertical sizing property specifies how the horizontal or vertical size of the object may change at runtime to accommodate the objects or data within it. 27.What are the property values for Horizontal/Vertical Elasticity? Discuss its function? Ans: There are four property values are available for Horizontal/Vertical Elasticity. They are a. Contract - Means the object decreases, if the formatted objects or data within it are wide enough, but it cannot increase to a width greater than that shown in the Report Editor. b. Expand - Means the object increases, if the formatted objects or data within it are wide enough, but it cannot decrease to a width less than that shown in the Report Editor. c. Fixed - Means the width of the object is the same on each logical page, regardless of the size of the objects or data within it. d. Variable - Means the object may expand or contract to accommodate the objects or data within it. 28. What is Additional Default Layout? Ans: Additional Default Layout is created for two different formats using same query and groups without modifying default layout created by report wizard. 29. Can u have more than one layout in report? Ans: It is possible to have more than one layout in a report by using the additional layout option in the layout editor.

Oracle Reports Q&A

30.What is the minimum number of groups required for a matrix report? Ans: The minimum numbers of groups required for a matrix report are 4. 31. Is it possible to change the margins for oracle report? Ans: Yes, it is possible to change the margins in Oracle Reports for all the three layout section (Header, Body and Trailer). 32. What is the difference between "AFTER PARAMETER FORM" trigger and "BEFORE REPORT" trigger? Ans: AFTER PARAMETER FORM trigger fires immediately after the report parameter form is submitted. BEFORE REPORT trigger fires after the report queries are parsed and data is fetched. 33. How can you display one record per page? Ans: By Setting the Repeating Frame Properties Maximum records per page to 1, we can display one record per page. And it will override group filter property. 34. What is Data Model? Ans: The Data Model is a work area and it enables you to define and modify the data to be used in your report. Report Builder uses the data model to determine what data to retrieve for the report. The data retrieved from the database may or may not appear in the report output. 35. What is Layout model? Ans: The Layout Model is a work area and it enables you to define and modify the format of your report output. Report Builder uses the Layout Model as a default template for the report output. 36. What is Live Previewer? Ans: The Live Previewer is a work area in which you can preview your report and manipulate the actual or live data at the same time. In the Live Previewer you can customize reports interactively, meaning that you can see the results immediately as you make each change. In order to edit your report, such as changing column size, the Live Previewer must be in Flex Mode. 37. What is Parameter Form Ans: The Report Editor's Parameter Form view enables you to create a Runtime Parameter Form for your report. You can select pre-defined system parameters for your form using the Parameter Form Builder, or you can create your own. 38. What is Group? Ans: Groups are created to organize the columns in your report. When you create a query, Report Builder automatically creates a group that contains the columns selected by the query. You create additional groups to produce break levels in the report, either manually or by using the Report Wizard to create a group above or group left report. 39. What is Template? Ans: The Template Editor is a work area in which you can define objects and formatting properties for your templates. It is similar to the Layout Model view of the Report Editor. You can create, delete, and modify objects (e.g., page numbers, text, and graphics) in the margin area. You cannot create and delete objects in the body area, but you can modify the properties of body objects in the Property Palette. 40. How do you add Custom Template in Pre-Defined Template List? Ans: In Report Editor, open an existing Template or create a new Template and save it concerned directory (orant\REPORT60\admin\template\US). Then Edit

Oracle Reports Q&A CAGPREFS.ORA File and Specify which under which type of Template you are going to develop use it (Tabular, Form Like, Matrix and etc.,). 41.What is Data Link? Ans: When we join multiple queries in a report the join condition is stored in the data link section. A data link causes the child query to be executed once for each instance of its parent group. 42.What are the various types of Data link? Ans: The Data Link tool draws a link between a parent group and a child query. Creating a link is a drag and drop operation. a. Column to Column Link: Clicking and dragging from one column to another, creates a link between those two columns. b. Query to Query Link: Clicking and dragging from one query to another, creates all possible links between columns selected by the queries based on database constraints. c. Group to Group Link: Clicking and dragging between two groups, creates a a link with no columns. 43. What are Physical and Logical pages in Reports? Ans: Physical Page: A physical page is the size of a page that will be output by your printer. Logical Page: A logical page is the size of one page of your actual report (one logical page may be made up of multiple physical pages). The Runtime Previewer displays the logical pages of your report output, one at a time. 44.What is Print Direction Property? Ans: The Print Direction property is the direction in which successive instances of the repeating frame appear. It values are, a. Across b. Across/Down c. Down d. Down/Across 45. What is Page Protect Property in oracle reports? Ans: The Page Protect property indicates whether to try to keep the entire object and its contents on the same logical page. Setting Page Protect to Yes means that if the contents of the object cannot fit on the current logical page, the object and all of its contents will be moved to the next logical page. Default Page Protect is No. 46. How do you write the report output to Excel file or text file? Ans: You can use the following methods to write the output of oracle reports to Excel or text file. a. Use TEXT_IO package b. Use SPOOL in After Report trigger c. Use UTL Package 47. What is the Break Order property of columns? Ans: The Break Order property is the order in which to display the column's values. This property applies only to columns that identify distinct values of user-created groups (i.e., break groups). The order of column values in a default group is determined by the ORDER BY clause of the query. For column values in user-created groups, however, you must use Break Order to specify how to order the break column's values.