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

Application Errors

edited March 2004 in General
I have a report where I am displaying 10 DBChart components. All of these
charts are connected to different datasources. The actual report is not
connected to a datasource. I am using RB 7.02 and TeeChart 6.01. Each chart
is connected to it's own query. The report previews just fine, but when I
go to exit the application, I get Application Errors - saying that I'm
referencing invalid memory locations. 9 of the charts are part of the
detail section of the report, with the final chart being part of the Footer
section. If I remove 3 charts so that the report fits on one page, no
problems. I've tried putting all 9 reports into the detail section with no
success. Then I tried using a "section" style subreport with the final 3
charts on that, but I still get the errors. I've tried using ppReport1.Stop
on the AfterPrint event or on the PreviewFormClose event, but still no
success. Do you have any ideas as to how I can solve this issue?

Comments

  • edited March 2004
    Hi Gary,

    ReportBuilder 7.02 is not compatable with TeeChart 6 or higher. Please
    upgrade to RB 7.03 and test with that. If you already own 7.02, the upgrade
    is free of charge. Contact sales@digital-metaphors.com with your serial
    number and purchase name for more information.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    I followed your instructions and upgraded to RB 7.03 and that didn't help
    anything. I only get these errors when I close the application. The
    application itself is just the report with the charts on them. I continue
    to get errors when I close Delphi. I don't have any data pipelines assigned
    to the subreport or the main report. I have 10 data pipelines assigned to
    each respective DBChart component. It seems like the errors are happening
    when the application goes to destroy or free the report component.

  • edited March 2004
    Gary,

    How are you connecting the charts to the datasets? Unfortunately, the
    ReportBuilder Teechart components will only work correctly when connected
    directly to a TppDataPipeline. If you are connecting some of your charts to
    another series, you may be experiencing a destroy bug in TeeChart. This
    issue has been an ongoing problem with TeeChart that we notified the TeeMach
    guys about well over three years ago. They have yet to address the problem
    as it does not affect their immediate product. As an alternative, you could
    try creating the charts outside ReportBuilder, save them down as images and
    import the images to the report. We have many customers use this method to
    work around the limitations of using TeeChart with ReportBuilder.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    Thanks for the quick response Nico. I am connecting all 10 charts to their
    own TppDBPipeline. None of the charts are linked to one another. I fooled
    around with the method you suggested of importing images to Report Builder.
    I gave up when I found that I couldn't save an image unless the actual chart
    was visible on a form. Maybe I didn't investigate it enough. Can you tell
    me how to create a TChart image without the chart being visible? For
    example, I will eventually want this report I'm trying to create to be on a
    web server - using the web tier approach. Is there a way I can create chart
    images off-screen and just import the image to RB Server?

    Thanks.

  • edited March 2004
    Hi Gary,

    Although I am definitely not an expert on the best way to implement
    TeeChart. You could place a TeeChart on a form with its Visibility set to
    False. Then using the Chart.TeeCreateMetaFile method, you could save the
    MetaFile vector image of the teechart and then assign it to the
    TppImage.Picture.Graphic property in a Report. This way you will only see
    the chart in the report.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited March 2004
    Well, I've tried the approach you suggested using the
    Chart.TeeCreateMetaFile method and assigning the image to the
    TppImage.Picture.Graphic property and that works, but only if the actual
    DBChart is visible (the property) AND part of the chart is viewable on the
    form. If the form is sized so that the chart doesn't show, no image.
    In any case, I started recompiling the TeeChart packages that come with
    Report Builder. I'm following the instructions in the TeeChart help file
    (under Report Builder). When I try to recompile the dclRBC77.dpk, I get an
    error in the ppChReg.pas unit saying that it can't find the DesignIntf.dcu.
    That file exists in my Delphi7\Source\ToolsAPI directory, so I added that to
    my library path and now I get an error in the DesignEditors.pas unit saying
    it can't find Proxies.dcu. The only Proxies.dcu file I have on my hard
    drive is in my Delphi5\Lib directory dated 8/11/1999. Is my installation
    corrupt or what?

This discussion has been closed.