Hi, I am using Delphi 7 with Crystal VCL 10. My program will display a crystal report rpt file, then I'll call the CloseJob method to close the report. It is working fine with reports that are without subreport. But when I open any report that contains subreports, calling the CloseJob method gives me the following error:
Access violation at address 0183737F in module 'crqe.dll'. Read of address 00000004.
Tracing the code brings me to this function TCrpeEngine.PEClosePrintJob in CRDynamic.pas, where the above error occur upon executing this line:
Result := TPEClosePrintJob(CrpeClosePrintJob)(printJob);
I am not able to further trace the TPEClosePrintJob as it is a stdcall inside a DLL (sorry I'm not sure is it the correct way to say it). Clicking Find Declaration on TPEClosePrintJob brings me to this line
TPEClosePrintJob = function (printJob : Smallint): Bool; stdcall;
Please help me, I am really stucked now. Is there anything I should do with the subreports before calling CloseJob?