ORACLE REPORTS TUTORIAL

Report Builder Features • A query builder with a visual representation of the specification of SQL statements to obtain report data

• Wizards that guide you through the report design process • Default report templates and layouts that can be customized to meet your reporting needs

• The ability to generate code to customize how reports will run • • A Live Pre-viewer that allows you to edit report layouts in WYSIWYG mode An integrated chart builder that helps you to graphically represent report data

• Web publishing tools that dynamically generate web pages based on your data • Other standard report output formats like HTML, PDF, PCL, Postscript, and ASCII Starting Report Builder 1. Make sure PC Xware is running 2. Telnet Pegasus by typing telnet pegasus.rutgers.edu or connect to pegasus from the SSH client (make sure X11 Tunneling is enabled in SSH preferences) 3. start oracle Report Builder by typing rwbld60 Using Wizards

Report Builder has a Report Wizard, Data Wizard, and Web Wizard to automate the creation of reports. Most often, you can create a report by starting with one of the wizards, and then refining the report that the wizard creates using the data model view and the layout view. To create a report using report wizard 1. If the Welcome dialog box appears (the following screen), click Use the Report Wizard and click OK.

If the Welcome dialog box does not appear, choose File->New->Report. Click Use the Report Wizard and click OK.

2. You will receive the following screen unless you selected not to display it in the future previously. Click next

After you select the type you want click next . Select Report type. this will affect report layout.3. you can see the different layouts by clicking their corresponding buttons and looking at the sample layout on the left.

1. If you are not connected. you need to connect as shown in the following screen. . The data presented in the report is the result of a query.You can create that query by one of three methods: (1) writing a SELECT statement (2) Building the query using the Query By Example (QBE) interface. (3) importing the query.

.

5. Select the fields you would like to display in the report in the order you want as shown in the next screen. Then click next .

1. Apply aggregate functions to the fields if you want by selecting the field then the aggregate function. Then click next .

Change Field names and their width as shown in the next screen then click next .1.

Select a template then click next .1.

On the last page of the Report Wizard. click Finish. .1.

A report is created and appears in the Live Previewer. .1.

Using the View menu or the toolbar. columns. select View menu then Live Previewer. such as frames.1. You will work in each of the following Report Editor views as you create the sample reports in this tutorial: • • • • Live Previewer Data Model view Layout Model view Parameter Form view Live Previewer This view displays your report as the end user will see it. fields. Any modifications that you make to the report in the Live Previewer are reflected immediately. Note that the Live Previewer is one of several report views that are available in the Report Editor. select View menu then select Data Model. Layout Model view This view displays the attributes of your report as objects so that you can see the attribute types and relationships. From the Live Previewer. If you are using existing data. you can edit the report as desired. the Live Previewer will update the report as data changes. boilerplates. You can edit layout objects. parameters. To display your report in the Live Previewer. you can switch to other report views to Report Editor In the Report Editor. and graphics in this view in order to change the appearance of the report. you can view information about a report in four different ways. anchors. and links. You can switch between these views using the View menu or the toolbar icons. To display your report in the Data Model view. groups. repeating frames. To display your report in . Data Model view This view displays your report data as data model objects so that you can see the relationships between queries.

If you do not define a Runtime Parameter Form in the Parameter Form view. You can select multiple columns and items by holding shift and clicking on those columns or report items. the user may accepts the defaults. select View menu then select Layout Model. select View menu then select parameter form. Report Builder will select all the rows in that column to indicate that changes will apply to all the rows. When a user runs your report. You can select which system and user parameters to use for your form using the Parameter Form Builder. Modifying Report Format To apply changes to any column. . the user enters values for parameters in this form to determine how the report will execute. Parameter Form view This view lets you create a Runtime Parameter Form for your report. Report Builder displays a default Parameter Form at runtime. or you can create your own from scratch. To display the Parameter Form view.the Layout Model view. click anywhere in that column. Otherwise.

toggle between bold/unbold. centered. You can also change data alignment (left justified. font size. apply the required changes by selecting the appropriate icons from the formatting toolbar. etc. . right justified.After selecting the items you want to modify. As seen in the toolbar you can change font face.

etc. you should not go back and use the Conditional Formatting dialog box to make more modifications. select Conditional Formatting as show in next screen. (For example. Under the general layout section. Or right click that data item and select property palate. 2. percentage sign. there is a similar feature there. select that item. The Conditional Formatting dialog box alone may satisfy your requirements for creating a formatting exception without the need to edit the corresponding trigger. yo can add dollar sign. . you will get the conditional formatting dialog box. To apply conditional formatting to an item: 1. you can make a field’s value Red when it exceeds a specified maximum value). then select property palate from Tools menu. increase number zeros on the right to the decimal point. However. If you are familiar with Excel.full justified). once you directly edit a Format Trigger for an object. Conditional Formatting The Conditional Formatting is a great way to apply formatting exceptions to your layout objects. For Monetary data items.

.

You can have a complex condition . Apply a condition by selecting an operator such as Less than or Between then put the values for the condition.3. Click New 4.

fill color. . You can also select to hide the data item. 5. The AND/OR will be enabled (on the right). etc.(multiple conditions connected by AND or OR) by clicking radio button in the next line. color. Then Apply the format you want when that condition is met by changing the font face.

Finally. Write a query or build it by the query builder or import an SQL query from an existing SQL file. First. you will link the two queries. 1. click the SQL icon (on the left) then click anywhere inside the data model screen. Click Ok to exit.6. Then you will create a break group for the first query. you will create two queries. Creating Data Model In this section you will learn how create a multiple-query data model. In the Data Model view. . You will get SQL Query Statement screen as show below. when you click ok you go back to the Conditional Formatting dialog box with the Format expression written in.

.

. Make sure to have PK / FK relation between the two tables in the two queries. You will get the a drawing representing the query as in the next screen 3.2. Now repeat the same steps again to build another query.

Click on one of the fields in the relation and drag to the other field in of the relation in the other table. Select the link tools (two overlapping circles). . You will get the following screen.4.

.5. Create a break group by dragging a field between the query name and the field list as shown below.

6. Notice that they have new names (in the screen above). You will get the first tab of the wizard (Style) Notice that this selection is related to the way you will organize the different parts of the report. For example. employee is now G_FNAME. Select Group Above . generate a default layout by running the report wizard from the Tools menu. At this point you have two tables and a breaking group.

For example. down means vertically. These buttons (Across. then select G_Fname and click Down. Across means fill horizontally.7. etc) indicate how the report will be filled up. Down. Across/Down means horizontal then vertical . In the group page select G_1 and click across. select G_DNAME and click Across.

Select the field you want to display. You may not need all field if some fields are repeated such as DNO and SUPERSSN. .1.

8. . Select a Label and field width for every field.

Select a Template. You may not get the exact list of templates and hence not the same way the report locks. Then click Finish. .9.

11. Notice that every department shows in a separate page.You should get something similar to this. You can see other pages by clicking the arrow in the toolbar or changing the page number in the toolbar also. .

.

12.Now you can change formatting to lock the way you want it. .

Sign up to vote on this title
UsefulNot useful