Upload
ngonhi
View
226
Download
2
Embed Size (px)
Citation preview
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 1 of 27
HOW TO CREATE TOAD®
REPORT MANAGER CHARTS
LESSON 3
A step by step guide for creating a simple
line chart in a TOAD® Report
By Gary Piper
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 2 of 27
Table of Contents
1 Prerequisite ............................................................................................... 3 2 Lesson overview ........................................................................................ 3 3 Copy the existing “Page Requests report” ................................................. 4 4 Change the SQL ........................................................................................ 7 5 Create a new page for the chart ................................................................ 9
6 Formatting the blank report chart page ................................................... 11 7 Adding the chart object ............................................................................ 12 8 Adding chart data .................................................................................... 15
9 View the basic chart ................................................................................ 17 10 Tidying up the chart .............................................................................. 18 11 Change the chart line thickness ........................................................... 21 12 Remove the chart legend ..................................................................... 22
13 Rotating the X axis labels ..................................................................... 23 14 Save everything ................................................................................... 24 15 Or - just download the TRD .................................................................. 24
16 Want to know more? ............................................................................ 25
17 Disclaimer ............................................................................................ 26
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 3 of 27
1 Prerequisite It is recommended that prior to completing this lesson that you: have completed and understood lesson 1 - How to Create TOAD® Reports
Manager Reports know how to copy a TOAD® Reports Manager report
2 Lesson overview A word of warning….this may seem to be a long process, but I have found once you have built one chart the process becomes much easier, so bear with it… In lesson one, “HOW TO CREATE TOAD REPORTS MANAGER REPORTS” we created a simple Self Service Page Requests report. In this lesson we will copy that report and create a report that shows the total number of page requests per day for a selected month. We will also add a chart as page one of the output. The rational behind copying the report is to save time as we already have the basic structure in the report. In this lesson we will:
Copy the page request report created in lesson one Change the report from page requests per user for a given day to a
report that shows the total self service page requests by day of month for a selected month
Adding the day of the week to the chart and detailed data to make it easier to identify the day’s activity (e.g. was the 2nd a Wednesday???)
All templates and reports created in this lesson have been provided in a TRD format on the www.PIPER-Rx.com website.
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 4 of 27
3 Copy the existing “Page Requests report” The report we will copy is the report you created in lesson 1 “HOW TO CREATE TOAD REPORT MANAGER REPORTS” The page request report can be downloaded from the www.PIPER-Rx.com website www.piper-rx.com/pages/reports_lessons.html if you no longer have a copy. Step 1: Select the report to be copied “page Requests” and select the copy icon as shown below:
You will then be presented with the Copy Report Definition Dialogue box:
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 5 of 27
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 6 of 27
Step 2: Change the name of the report
In this example I have change the report and file (fr3) name to Page Requests (Month) as we will only be showing the selected month’s data.
Tip: Make sure you change the “New Report Definition File name” to the same name used in the TOAD® Reports Manager, that way it is easy to track reports.
Step 3: Select [OK} The copied report is now available
Trick: Up to and including TOAD® 9.6 - The category and any changes you have made to report names and any SQL will only be saved when you exit the TOAD® Reports Manager. (This may have been changed in subsequent TOAD® releases.)
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 7 of 27
4 Change the SQL In this report we are limiting the displayed data to the month entered in the report parameters. Step 1: Change the SQL in the report as indicated below:
Existing SQL
SELECT to_char(sysdate, 'DD-Mon-YY fm(Day)') page_heading_date,
:sample_date v_sample_date,
database_name.sid_name page_heading_sid_name,
fu.user_name,
sum(isess.counter) page_requests
FROM icx.icx_sessions isess,
applsys.fnd_user fu,
(SELECT name sid_name
FROM gv$database
WHERE inst_id = 1) database_name
WHERE isess.user_id = fu.user_id
and trunc(isess.first_connect) = to_date(:SAMPLE_DATE, 'DD-Mon-YY')
GROUP by fu.user_name,
database_name.sid_name
ORDER by 4 desc
Revised SQL
SELECT to_char(sysdate, 'DD-Mon-YY fm(Day)') page_heading_date,
upper(:sample_month) v_sample_month,
database_name.sid_name page_heading_sid_name,
trunc(isess.first_connect) sample_date,
to_char(trunc(isess.first_connect), 'DD-Mon-YY (Dy)') formatted_day,
sum(isess.counter) page_requests
FROM icx.icx_sessions isess,
applsys.fnd_user fu,
(SELECT name sid_name
FROM gv$database
WHERE inst_id = 1) database_name
WHERE isess.user_id = fu.user_id
and to_char(isess.first_connect, 'Mon-YY') = :SAMPLE_MONTH
GROUP BY database_name.sid_name,
trunc(isess.first_connect)
ORDER by 4 desc
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 8 of 27
Step 2: Edit the report to show the current format as indicated below:
Existing Format
Revised Format
There are three (3) changes to be made:
The page heading value v_sample_date becomes v_sample_month The title User Name is to be changed to Sample Date The data value USER_NAME becomes FORMATTED_DAY
Now would be a good time to export the current report to a TRD format as a backup of the work.
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 9 of 27
5 Create a new page for the chart Step 1: Add a new page using the new page icon as shown below:
Note: The order of pages displayed in the final report is in tab order from left to right.
Step 2: Change the page order In general most people prefer to see the chart on the first page and the data on subsequent pages. Therefore, in order for the chart to be the first page of the report you need to change the order of pages. Drag and drop the page 2 tab between the code tab and the page 1 tab.
Before page order change
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 10 of 27
After page order change
The blank page on which we will create the chart will now be page one (1) of the report
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 11 of 27
6 Formatting the blank report chart page Step 1: Add the report title and page footer from page 1 to the blank page (page 2) Add a Report title and page footer section to your blank page using the “Insert Band” icon
Step 2: Add the report title and page footer values In order to maintain a consistent standard for all pages, copy the report title memo attribute from page 1 into the report title box added to page 2 and repeat for the page footer. You will need to resize both page two report title and page footer to suit.
Example Page 2 with report title and page footer
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 12 of 27
7 Adding the chart object Step 1: Add a chart object as indicated:
Once you place the chart on the page the chart editor dialogue box will open
Close the chart editor dialogue box as this is not needed yet.
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 13 of 27
Step 2: Resizing the chart object to fit the page Position the chart top left to the edge of the page and expand the chart to fit the page
Note: The chart has been expanded over the page footer box. That is OK the page footer will still appear on the report.
Step 3: Add a frame (border) around the chart Next add a frame (border) line around your chart. It always makes the chart look better in the final report and it has the added benefit of ensuring the chart is fitted to the page width as you can clearly see the chat edges. Use the “All Frame Lines” icon to add the chart frame (border).
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 14 of 27
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 15 of 27
8 Adding chart data Step 1: Open the Chart Editor Double click anywhere in the chart to bring up the chart editor Step 2: Add the series to the chart First we need to add a chart series, use the icon to add a series
In this lesson we will add a “Fast Line”
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 16 of 27
Step 3: Add a data set
The data set is “Master”, the X value is our formatted day series and the Y value is the page requests value Step 4: Select OK to accept these settings
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 17 of 27
9 View the basic chart You can now view the basic chart using the “Preview” report icon
Example Chart
So far, so good…..
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 18 of 27
10 Tidying up the chart Step1: Open the Chart Editor Double click anywhere in the chart to bring up the chart editor
First turn off the 3D chart walls by un-checking the View 3D and View 3D Walls options
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 19 of 27
Uncheck these two options
Step 2: Add a chart title A chart title can be added as follows:
Expand the “Title” option and select the Text option Add the chart title text
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 20 of 27
Step 3: Change the chart title font Expand the “Font” option under the chart “Title” option to display the title font options
The format of the chart title can be changed in this section; in this example I have changed the title text to Arial 12, bold and blue.
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 21 of 27
11 Change the chart line thickness I have found that the default line thickness of 1 is too thin; setting the line thickness to a value of 2 makes the chart look so much better… Expand the “LinePen” option
The chart line colour can be changed using the “Color” option and the chart line thickness via the “width” option
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 22 of 27
12 Remove the chart legend As we only have one series for this chart uncheck the ShowInLedgend option Un-checking this option will prevent this series from being displayed in the chart legend
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 23 of 27
13 Rotating the X axis labels In this lesson we are displaying the date value in the format DD-Mon-YY (Day). This quite a long value and displays better when rotated 90 degrees. First select the chart level and expand the “BottomAxis” value. Then change the “LabelsAngle” to 90 which will rotate the X-Axis labels 90 degrees
Note: I have found that when you enter a value and select [OK] it may not save that value. To get around this you enter the desired value and select any other field before you select [OK]
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 24 of 27
14 Save everything You now have a simple chart which should look something like the following example:
Save the report definition (FR3)
When back in the TOAD report Manager screen, export the report (TRD)
Exit the report manager to force a save of the report manager settings
Don’t forget once you have the report in an export format (TRD format) you can take it with you or send the report to another user.
15 Or - just download the TRD To save time, the example report created in this lesson (TRD format) is provided as a download LOCATION
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 25 of 27
16 Want to know more? There is loads more FREE information on TOAD Reports Manager reports and also on all aspects of OEBS Application Administration at the PIPER-Rx website. I have been working with TOAD Reports Manager since its inception and have had over 20+ years working with Oracle (the product, not the Company) and Oracle E-Business Suite (since Release 5). Since the late 1990's I have spent more time sharing these learnings and the most popular papers and case studies I have presented are available at www.PIPER-Rx.com as well as over 250 TOAD Reports Manager reports and a whole host of Tips and Reports I have used throughout my career. All information is at the PIPER-Rx.com website FREE so why not check it out….I hope you find it useful! – 40,000+ downloaders to date can’t be wrong!
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 26 of 27
17 Disclaimer The material contained in this document is provided by the author "as is" and any express or implied warranties, including, but not limited to, any implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of any content or information, even if advised of the possibility of such damage. It is always recommended that you seek independent, professional advice before implementing any ideas or changes to ensure that they are appropriate.
Oracle®, Oracle Applications® & Oracle E-Business Suite® are registered trademarks of Oracle Corporation
TOAD® is a registered trademark of Quest Software
Lesson 3 – How to create a Chart in TOAD® Reports (Dec 2009)
PIPER-Rx – Home of the E-Business Resource Centre
Use of this document is subject to the legal notice and disclaimer detailed at www.PIPER-Rx.com © 2009 G Piper Page 27 of 27
TOAD® is a registered trademark of Quest Software