hands on lab oracle bi publisher collaborate 2010

Upload: gauthamsampath

Post on 09-Apr-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    1/34

    HandsOnLab:OracleBusinessIntelligencePublisherOverviewOracle BI Publisher (formerly known as XML Publisher) is a comprehensive reporting anddocument output management solution from Oracle. Oracle BI Publisher report formats can bedesigned using Microsoft Word or Adobe Acrobat, tools that are easy to use, and most users arealready familiar with. Oracle BI Publisher also allows you to create reports from multiple datasources.

    Oracle BI Publisher can be used as a stand-alone reporting product or integrated with the OracleBusiness Intelligence Suite Enterprise Edition and many Oracle Applications and Products (suchas E-Business Suite, PeopleSoft, JD Edwards Enterprise One and World, and others) as well ascustom applications.

    Because BI Publisher may also be integrated with Oracle BI Enterprise Edition, enabling you tocreate the BI publisher reports based on Oracle BI Answers requests or based on Oracle BIServer subject area. For more details, you can refer to the Tutorial (Oracle By Example) titled"Integration of Oracle BI Publisher with Oracle Business Intelligence Enterprise Edition,10.1.3.2."

    http://www.oracle.com/technology/obe/obe_bi/bipub/bip_biee/bip_biee.htm

    Scenario

    You will start by logging in to BI Publisher and create a report based on an Oracle Database.You will be guided through the steps to create and upload RTF templates using the BI PublisherTemplate Builder Add-in to Word. You will also create parameterized report that uses LOVs.You will also schedule the report, and view the saved data.

    1

    http://www.oracle.com/technology/obe/obe_bi/bipub/bip_biee/bip_biee.htmhttp://www.oracle.com/technology/obe/obe_bi/bipub/bip_biee/bip_biee.htmhttp://www.oracle.com/technology/obe/obe_bi/bipub/bip_biee/bip_biee.htmhttp://www.oracle.com/technology/obe/obe_bi/bipub/bip_biee/bip_biee.htm
  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    2/34

    LoggingIntoOracleBIPublisher:1. Enter the URL for BI Publisher in a browser window which is of the format:

    http://:/xmlpserver/ (for example, http://localhost:9704/xmlpserver/)The Log In screen for the BI Publisher appears. Enter Administrator as the Username andPassword. ClickSign In.

    2. This displays the Home page for BI Publisher.

    2

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    3/34

    Note: Since you logged in as the Administrator, the welcome page displays the Reports,Schedules, and Admin tabs.

    CreatingaBIPublisherReportBasedonOracleDatabaseIn this topic, you will create an employee salary report based on the HR schema of OracleDatabase. Follow these steps:

    1. ClickReports tab to go to the Reports page.ClickMy Folders, and clickCreate a New Folder link (found in the Folder and Report Taskssection).Enter Learn as the folder name and clickCreate. (You will save the reports you create here.)

    2. Open My Folders > Learn, and clickCreate a New Report under Folder and Report Tasks.

    3

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    4/34

    Enter Based on OracleDB as the name of the report, and clickCreate.

    3. The report is displayed in the Learn folder in BI Publisher.Click the Edit link under the name of the report to edit the report.

    4

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    5/34

    4. In the General Settings section of the Report Properties, select demo from the Default DataSource drop-down list.

    Click the Save icon (found at the top-left corner) to save the changes.

    5. ClickData Model and clickNew to define the data source for this report.

    5

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    6/34

    6. In the Data Set screen that appears,ensure that SQL Query is selected as Type, anddemo is selected as Data Source.Select the Cache Results check box,and clickQuery Builder to define the query.

    6

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    7/34

    7. The Query Builder screen appears, ensure that HR is selected from the Schema drop-down list.This displays objects from HR schema on the left.ClickEMPLOYEES and DEPARTMENTS tables to add them to the Model canvas on theright.

    7

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    8/34

    8. Define a join between these two tables as follows:Click the box beside the DEPARTMENT_ID column in the DEPARTMENTS table. (See thefollowing screens.)Similarly click the box beside the DEPARTMENT_ID column in the EMPLOYEES table.These boxes when marked for joins turn to light gray.

    Also note that a fine line joining the tables appears in the Model canvas.

    Hint: Take the help of the screens below:

    8

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    9/34

    9. Select the following columns from the tables (by selecting the check boxes beside the columnnames):-Select DEPARTMENT_NAME from the DEPARTMENTS table.

    -Select FIRST_NAME, LAST_NAME, HIRE_DATE, and SALARY columns from the

    EMPLOYEES table.(See the following screen.)

    10. ClickConditions, and move the DEPARTMENT_NAME, to appear first in the list (as shown

    in the screen below).You can use these icons beside each column to move the columns up or down.

    Move columns so that the final list appears like this:

    9

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    10/34

    11. ClickResults to see how the query results appear in Query Builder.

    ClickSave to save the query.

    12. This will take you back to the Data Set screen, with the query you created reflected in the SQLQuery text area.

    ClickSave to save the BI Publisher report.

    10

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    11/34

    13. ClickView to view the report. ClickView again to view the XML data. Because you have notdefined a template, you can view only XML Data.

    Note: You may not be able to interpret the XML data, but you may want to check whether the BIPublisher report is returning some valid data by viewing the XML data before creating a

    template for the report. Creating and uploading templates is covered in the next topic.

    CreateaLayoutUsingBIPublisherTemplateBuilderIn this topic, you create an RTF layout template for a BI Publisher report and upload it. You willalso view the report in various formats.

    Creating an RTF Template with a Chart and Table

    1. Start Word from the program menu. Open DeptSalLayout-start.rtf from the Desktop.

    Under the Add-Ins tab, from the Oracle BI Publisher menu, select Log On.

    2. In the Login screen that appears, enter Administrator as the Username and Password, and clickLogin.

    The first time when you connect, you may be asked for the report server URL, e.g.http://:9704/xmlpserver

    11

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    12/34

    3. This displays the Open Template window. Ensure that BI Publisher is selected from the Workspacedrop-down list.

    Navigate and select theBased on Oracle DB

    report that you have created fromMy Folders> Learn

    .ClickOpen Report.

    Note: When you open the report you will not see any data in the Word document, but this will load theXML data definitions from the query to facilitate defining the template.

    4. First add a chart to the template. Select the text in the RTF template.To insert a chart to the template, select Insert > Chart from the Template Builder Custom Toolbarsmenu

    12

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    13/34

    5. In the Chart window that appears, define the graph characteristics by following the instructions listedbelow carefully:

    Drag Salary to the Values field and Department Name to the Labels field. Select Pie Chart from theType drop-down list for the graph. (See the screen below.)

    Note: Optionally Preview. If you do not like the style and type of the graphs in the preview, you canchange them after the preview or later.

    ClickOK to save the chart to the layout.

    6. Optionally insert a Vertical Bar Chart that is Average Salary by Department

    13

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    14/34

    7. Now to add a data table. Page down to the second page in the RTF layout. Delete the sample tablethere. Position the cursor on the 2nd page and from the Template Builder Custom Toolbar menu, selectInsert> Table Wizard to create a data table in the layout.

    8. This displays the Table Wizard. Select Table and clickNext.

    14

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    15/34

    9. See that ROWSET/ROW is selected as the Grouping Field, and clickNext.

    10. Click to include all the fields in the table. (See the screen below.)ClickNext.

    15

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    16/34

    11. Select Department Name from the Group By drop-down list, ensure that the Group above option isselected, and accept the defaults for other options. ClickNext.

    12. Select Salary from the Sort By drop-down list, and select the options Descending and Number to sortthe Salary column in descending order. ClickNext.

    16

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    17/34

    13. Optionally edit the labels of the columns as required. Accept the defaults and click Finish.

    The table you created looks like this:

    Note: Notice the words and letters with the gray background. These are called form fields. Form fieldsare Word objects that allow you to reference other data. BI Publisher uses form fields in two ways:

    First is to reference data fields from the report definition (like FIRST_NAME and SALARY).Second is to embed instructions that control how the data fields will be laid out (like group ROW byDEPARTMENT_NAME, F (For Each), and E).

    If you are curious to know what these instructions are, double-click the form field and view the Helptext. It is important to treat these form fields carefully and not accidentally delete or move them. Doingso may change or break the layout in your report. You can add or modify your own form fields with

    17

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    18/34

    XSL commands to do more sophisticated things with the table layout.

    You can leverage Word's native formatting features on this template, such as changing the backgroundand text colors, adding a title, and so on. This is covered next.

    14. Select the File> Save As option. Enter Based_On_OracleDB.rtfas the name of the template and clickSave.Do not close the file or log out of BI Publisher.

    Note: You can save the file in any local folder on your system, but you have to save the template inRich Text Format (*.rtf) format, not in Word (*.doc) format.

    18

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    19/34

    15. Preview how the template looks like with the data by selecting

    Preview > PDF to preview the report.

    The first page looks like this:

    19

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    20/34

    The second page looks like this:

    Formatting the Template Using Native Word Features

    In this topic, you will modify the Based_On_OracleDB.rtftemplate that you have created usingnative Word features, such as changing the background and text colors, adding a title, and so on.

    Perform the following steps:

    20

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    21/34

    1. The basic Based_On_OracleDB.rtftemplate that you have created is shown below:

    Make the following changes using Word features:

    1. Apply text style Heading 2 to DEPARTMENT_NAME.2. Add boiler plate text Department List of Employees after DEPARTMENT_NAME.3. Right align the Salary column (col header and data) using the align right icon on the

    toolbar.

    The data table in the template should look like the screen below after these changes:

    2. Format Hire Date as follows:

    1. Double-click the field for HIRE_DATE below the column header.2. In the BI Publisher Properties dialog, select Date from the Type drop-down list, select

    M/dd/yyyy from the Format drop-down list, and type in 1/1/2010 in Text to display.

    3. ClickOK.

    21

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    22/34

    3. Similarly, format the Salary field as follows:

    1. Double click the SALARY field below the column header.2. In the BI Publisher Properties dialog, select Number from the Type drop-down list,

    enter $#,##0 from the Format drop-down list, and type in 9999 in Text to display.

    3. ClickOK4. Now the table in the template should look like this:

    4. Save the file as Based_On_OracleDB.rtf.(Do not close the file or log out of BI Publisher.)

    Uploading the Template for a BI Publisher Report

    You can directly upload a template that you have created in Word to a BI Publisher report,provided:

    You are connected to BI publisher from Word The BI Publisher report is opened in Word The template is saved in RTF format

    To upload the Based_On_OracleDB.rtftemplate that you created in Word, and then view datafor the report in BI Publisher using this template, perform the following steps:

    1. In the Template Builder Add-In, select the Oracle BI Publisher> Upload Template As.

    22

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    23/34

    2. The Upload as new dialog box appears.Enter Template1 as the template name, and clickOK.

    After the template is uploaded, a dialog displays indicating that the template is added to the BIPublisher report. ClickOK again.

    Viewing Your Report in BI Publisher

    1. Return to your browser. If not logged in, Log in to Oracle BI Publisher as Administrator/Administrator.

    2. Navigate to My Folders>Learn, and click the View link below the Based on OracleDB report.

    3. You can see that the report is displayed using Template1 that you created and uploaded.

    Scroll down to see the table data in HTML format

    Note: You can also view the data in other formats, such as PDF, RTF, MS Excel, and so on.

    23

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    24/34

    CreatingaReportwithParametersandListofValuesIn this topic, you create a report with parameters and list of values.

    To create a report with parameters and list of values, perform the following steps:

    1. (If not logged in) Log in to BI publisher as Administrator, and navigate to My Folders>Learn.

    Click the report icon beside the Based on OracleDB report.

    2. This displays additional report actions in Folder and Report Tasks.ClickCopy Report and then clickPaste from Clipboard to paste it in the same folder. (See thescreens below):

    24

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    25/34

    Rename this copied report Report with Parameters and LOVs.

    3. Click the Edit link below the report to open the report in Edit mode.

    ClickNew Data Set1 found under the Data Model node in the Report pane on the left to editthe SQL Query for the report. Observe the screen below:

    25

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    26/34

    4. This displays the SQL Query for the report on the right.Edit the query to add a bind variable dname to the WHERE clause in the query as in thefollowing: (Observe the last line.)

    select DEPARTMENTS.DEPARTMENT_NAME as DEPARTMENT_NAME,

    EMPLOYEES.FIRST_NAME as FIRST_NAME,EMPLOYEES.LAST_NAME as LAST_NAME,EMPLOYEES.HIRE_DATE as HIRE_DATE,EMPLOYEES.SALARY as SALARYfrom HR.DEPARTMENTS DEPARTMENTS,HR.EMPLOYEES EMPLOYEESwhere DEPARTMENTS.DEPARTMENT_ID=EMPLOYEES.DEPARTMENT_IDand DEPARTMENTS.DEPARTMENT_NAME IN (:dname)

    ClickSave to save the query.

    5. Define a List of Values to be used with this parameter dname.In the Report pane displayed on the left, clickList of Values, and clickNew to create a new listof values.

    26

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    27/34

    6. In the List of Values screen that appears on the right, ensure that demo is selected as the DataSource, and clickQuery Builder to define a query for defining a list of values.

    7. In the Query Builder screen that displays the HR schema tables on the left, clickDEPARTMENTS to add it to the Model canvas on the right, and selectDEPARTMENT_NAME column (by selecting the check box beside it).

    ClickSave. This takes you back to the List of Values screen again which displays the query.

    ClickSave to save the changes to report.

    27

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    28/34

    8. Click the Parameters node in the Report pane on the left and clickNew to create the dnameparameter.

    9. This displays the Parameter screen on the right. Define the following:

    Identifier: dname. Data Type: String. Default Value: Sales.Parameter Type: Menu. Display Label: Enter Department Name

    List of Values: New List of Value 1. Check Can select all and radio button for All ValuesPassed

    ClickSave to save the changes to the report.

    28

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    29/34

    SchedulingBIPublisherReportsScheduling is a very important feature for any reporting system. This enables you to select atime and date to run your reports daily, weekly, or monthly, avoid peak processing times for yourdata sources, schedule long running reports to run over night, etc. In this topic, you schedule a

    report and view the report history and saved output.

    In this topic, you schedule the Based on OracleDB report that you created and view the savedoutput in the report history.

    1. Login to BI Publisher (if not already logged in), and clickReports tab to go to the ReportCatalog.

    Navigate to the My Folders > Learn folder.Click the Schedule link displayed below the report name for the Based on OracleDB report.

    29

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    30/34

    2. On the Schedule Report page that appears, select a template from the Template drop-down list,and PDF as the Format.

    Enter Based on OracleDB-Scheduled as the Job Name, and select appropriate language andtime options as per your requirements. Also, ensure that the Save Data for Republish and Save

    Output options are selected. (Observe the screen below.)

    30

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    31/34

    3. In the Time section, select any of the choices to see what they offer.Select Run Immediately to run the report now.Note: You can deliver the scheduled report to destinations such as Email, FTP Server, and so on.Configuring delivery destinations is out of scope of this tutorial.

    ClickSubmit. See a message indicating the scheduling job is created successfully.

    Also, note that the scheduled job is now displayed on the Schedules tab.

    31

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    32/34

    4. Click the History tab to view the report history. Note that the Data XML and Documentcolumns are shown in the history table.

    Click the icon in the Document column to see the saved report.

    This displays the report generated when the schedule was executed, using the template and

    format that you selected.

    Note: If you want to see the data of the scheduled report in XML form, you can clickDataXML. If you want to republish, which is take the data from the scheduled job and generate anew document using the same template (or a different template) you can select Republishoption.

    32

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    33/34

  • 8/8/2019 Hands on Lab Oracle BI Publisher Collaborate 2010

    34/34