WELCOME, GUEST
 
 
Minimize
How do I put a chart in my report?

 
For this example, we'll use a bar chart and the SCOTT.EMP table. Actually, any result set which has at least one textual (label) and one numeric (data) column in it will do.

  1. First, write your query. We'll use 'select ename, sal from scott.emp;'.
  2. Execute the query.
  3. Make sure the GRID is the active panel in Toad.
  4. In the GRID menu, select 'Report' (you can also r-click in the Grid and choose 'Report')
  5. Use the Toad Report Wizard to select the columns, grouping, layout, and style options.
  6. You should now be in the Report Design View.
  7. On the far left side of the screen, you should see a toolbar like so - 
     
  8. Place the 'Chart object' on the report area where you want your chart to appear. For this report we'll place it below the PageFooter1 object.
  9. Double Click on the Report Object.
  10. In the Chart Editor, click on the 'Add Series' button to the right of the Chart object in the tree list and choose 'Horiz. Bar'
  11. You should now have a 'Series1' object.
  12. Click on 'Series1'
  13. Choose the Data from DB radio control - this tells FastReports to populate the graph with the data returned from our query in step1.
  14. On the DataSet, choose 'Master'
  15. On the X Values, choose 'Master."ENAME"
  16. On the Y Values, choose 'Master."SAL"
  17. On the "Left Axis - Labels" control, set it to false.
  18. Close the chart editor.
  19. Now, making sure the 'Chart1' object is selected in the 'Page1' tree editor in the design view, let's size the object as we want it to appear in our report.
  20. On the 'Properties' tab, select Frame Height and set it to 10.00.
  21. Select Left and set it to 1.00.
  22. Select Top and set it to 8.30.
  23. Select Width and set it to 15.00.
  24. You can perfect the size of the graph by resizing it on the design view with your mouse.
  25. Ok, now Preview the report - hit the 'Preview' button on the Main toolbar.
  26. Save your report - it will be available next time you run this query.
  27. Starting with 9.0 you can schedule this query.