Access violation while in ppReport.Free
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
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
This discussion has been closed.
Comments
I can use your code without AV. Can you load a simple Report (empty report, just a label or two)?
regards,
Chris Ueberall;
Only reports with graph shows the error.
Thanks
Rajeev R
excuse my ignorance, but what does 'graph' mean, a TeeChart?
regards,
Chris Ueberall;
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
http://www.digital-metaphors.com
info@digital-metaphors.com
Its a TeeChart.
Thanks
Rajeev Ramanujan.