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

Freeing Graph.

edited November 2002 in Devices
Hi,

I'm previewing a Report with graph in it. I can preview the report first
time, but if I try to preview the graph again its shows access violation
while loading the file to the ppReport component. If this because the graph
is not freed from the memory ?

How will I free up a graph ? The line ppReport.LoadfromFile raises the
access violation while loading a report with graph.

I'm using Report Builder 6.03 Professional demo version for delphi 4.

Thanks
Rajeev R

Comments

  • edited November 2002
    What does your code look like?


    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited November 2002
    Hi,

    I have added the code below.

    if not (dbCurrentDatabase.Connected) then
    dbCurrentDatabase.connected := True;

    if not (dbGlobalDatabase.Connected) then
    dbGlobalDatabase.connected := True;

    //ppDesigner.AllowDataSettingsChange := TRUE;
    //ppDesigner.DataSettings.AllowEditSQL := TRUE;
    ppReport.Template.New;
    ppReport.Template.FileName :=
    'C:\Absence_Analysis_by_Year_with_Graph.RTM';
    ppReport.Template.Loadfromfile;
    ppReport.Print;
    end;


  • edited November 2002
    You don't have to call Template.New before loading a template. You can just
    load a template form file and you're good to go.

    Make sure that the Designer.Report property is assigned.

    Other than that it should work. I see that you are using RB 6.03 demo
    version. If you aren't using Delphi 4, then download our latest: RB 7 which
    works with Delphi 5, 6 and 7. www.digital-metaphors.com

    If you still are having trouble, then send us a simple report project that
    doesn't work and we'll run it to see what is causing the problem. Send all
    attachments to support@digital-metaphors.com




    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited November 2002
    Hi Jim,

    Thanks Jim it worked fine.

    Thanks
    Rajeev Ramanujan



This discussion has been closed.