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

Access violation while in ppReport.Free

edited October 2002 in Devices
Hi,

I'm creating ppReport and ppDesigner at runtime. After the
previewing a report and while trying to free up ppReport it raises up with
Access violation.

procedure TfrmModifySchedule.cmdPreviewClick(Sender: TObject);
var
lDataModule: TdaDataModule;
lQueryDataView: TdaQueryDataView;
ppRpt: TppReport;
ppDesgn: TppDesigner;
begin
ppDesgn := TppDesigner.Create(Self);
ppRpt := TppReport.Create(Self);
ConnectToSelectedDB;
ppDesgn.AllowDataSettingsChange := TRUE;
ppDesgn.DataSettings.AllowEditSQL := TRUE;
ppRpt.Template.New;
ppRpt.Template.FileName := m_sFileName;
ppRpt.Template.Loadfromfile;
ppRpt.Print;
ppDesgn.Close;
ppDesgn.Free;
ppRpt.Free; //this line raises with Access violation.
end;

Do i need to do set anything before I free up the ppReport
component ?

Thanks
Rajeev R

Comments

  • edited October 2002
    Hi Rajeev,

    I can use your code without AV. Can you load a simple Report (empty report, just a label or two)?

    regards,
    Chris Ueberall;
  • edited October 2002
    Hi,

    Only reports with graph shows the error.

    Thanks
    Rajeev R

  • edited October 2002
    Hi Rajeev Ramanujan,

    excuse my ignorance, but what does 'graph' mean, a TeeChart?

    regards,
    Chris Ueberall;
  • edited October 2002
    Please do not cross post across our newsgroups and with direct emails to
    support@digital-metaphors.com at the same time.

    This issue is being handled via support@. An old version of RB was being
    used and some pointers to help him were sent via email from support@.

    Cheers,

    Jim Bennett
    Digital Metaphors

  • edited October 2002
    Hi,

    Its a TeeChart.

    Thanks
    Rajeev Ramanujan.


This discussion has been closed.