p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

crystal_reports thread: ERROR 728 F ! HELP ME PLEASE!!!!!


Message #1 by "Peter Patchnikov" <peter@t...> on Tue, 5 Nov 2002 22:21:39
Hello to all, 
I use Cristal Reports 9, Deplhi 6. When I build my project on my PC i 
don't have any problems. but when i try it on other PC there is an error. 
I thing that the problem is in the Crystal Viewer. But I can't locate it!
Here is my source:

............
    crRegistyr.ReportName := '.\Spr\Reg.rpt';
    crRegistyr.WindowStyle.SystemMenu := true;
    crRegistyr.WindowStyle.BorderStyle := bsNone;
    crRegistyr.WindowButtonBar.Visible := true;
    crRegistyr.Execute;  {Run the report}
............

And here is the crystal's source where is i found the problem:


...................
function PEOpenPrintJob (reportFilePath : PChar): Smallint;
var
  CrpeOpenPrintJob : TFarProc;
begin
  CRDEngineError('');
  Result := -1;
  if CRDEngine = 0 then
  begin
    CRDEngineError(CRD_ENGINE_NOT_LOADED);
    Exit;
  end;
  CrpeOpenPrintJob := GetProcAddress(CRDEngine, 'PEOpenPrintJob');
  if CrpeOpenPrintJob = nil then
    CRDEngineError('PEOpenPrintJob')
  else
   {!!!!!!!HERE !!!!!!!!}
    Result := TPEOpenPrintJob(CrpeOpenPrintJob)(reportFilePath);
end;
..................
This function don't return any value! and 
Here the program raise an exception!
..................
    FPrintJob := PEOpenPrintJob(PChar(FReportName));
    FPrintJobs[0] := IntToStr(FPrintJob);
    {If PrintJob is zero, generate error}
    if FPrintJob = 0 then
    begin
      Result := False;
      case GetErrorMsg(0,errNoOption,errEngine,'','OpenPrintJob 
<PEOpenPrintJob>') of
        errIgnore : Exit;
        errAbort  : Abort;
        errRaise  : raise ECrpeError.Create(FLastErrorNumber, 
FLastErrorString); 
      end;
...........
And the error is:
  'Project MyProject.exe rised an exception class ECrpeError with 
message 'Error: 728 F OpenPrintJob <PEOpenPrintJob>'. Process stopped .... 
blah blah .
................

I REALLY NEED HELP SOON! THANK YOU !!!


P.S. I found a similar problem here descriped by Italo Cafferata, but It's 
decision from Katayama don't work too. ( crystal_reports thread: Run-Time 
Error 713, CR 8.0, VB 6.0 )



  Return to Index