Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

TeeChart Variables

edited March 2005 in General
Hi,

Im just starting with Teechart.
How do I use varibales (like counts and sums) as data for teecharts?

Thanks
Red

Comments

  • edited March 2005
    Hi Red,

    There is no automatic way to use the calculation from a report in a
    TeeChart, however, the TppTeeChart component is simply a wrapper around a
    TCustomChart object. You can access this object using the TppTeeChart.Chart
    property. From there you can use the TChart properties to alter the chart
    in your report.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2005
    Nico,

    Thanks, but Im not sure what the TppTeeChart.Chart property is.
    This isnt any command in the language tab of calcs.
    All I see is the TppPrintChartMethodType.
    The only event for the Chart object is OnPrint.

    Putting it simply - at my level :)
    - Do I need to code the DBCalc object to make it usable for Teechart, or
    do i need to code the chart object to help it use a dbcalc?

    Thanks
    Red


  • edited March 2005
    Hi Red,

    The simplest way would be to stick with aggregate fields in your dataset
    rather than use calculated fields in RB. This is the way TeeChart was
    designed to be used with ReportBuilder.

    The Chart property of the TppTeeChart object is available in Delphi as you
    place a chart on a report. For instance if you place a chart on your report
    a new object will be added to the interface section of your Delphi app.
    Then you can access the actual TChart object by using the ppChart1.Chart
    property. This then gives you access to all the native TChart functionality
    (you will need to take a look a the TChart help for help with these
    features). If you are doing this from RAP, you may need to create a pass
    thru function to get access to this object and its features.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2005
    Hi,

    Can you tell me which demos (nos.) may help with learning how to use
    Teechart in RB.

    Thanks
    Red



  • edited March 2005
    Hi Red,

    Check out Demo 92 (dm0092.pas) located in the \RBuilder\Demos\1. Reports\...
    directory.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2005
    Thanks.



This discussion has been closed.