Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error 20520: Job Already Started

Status
Not open for further replies.

tmeshgin

Programmer
May 11, 2000
1
US
I am writing a VB5 app that has an MS Access 97 back-end and Crystal Reports 4.6.1 for the reporting tool.<br><br>One of my reports runs fine the first time, but--after I run it and then run a different report and then come back the the first report to run it again--I get the following error: 20520: Job already started.<br><br>How do I keep this malady from occuring?<br><br>--Tim
 
I face this problems too but manage to solve it by:<br><br>1. create only 1 crystal report object in throughout the whole application ie. the main&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;menu.<br>2. create 1 global function to print report and handle the error handler there.<br>3. initialise all report fomulas before .printreport it.<br><br>-&gt;this will also solve the formula error.<br><br>Function PrintReport() As Boolean<br>&nbsp;&nbsp;&nbsp;mMain.MousePointer = vbHourglass<br>&nbsp;&nbsp;&nbsp;mMain.CReport.ReportFileName = RptPath + RptName<br>&nbsp;&nbsp;&nbsp;mMain.CReport.SelectionFormula = gString<br>&nbsp;&nbsp;&nbsp;mMain.CReport.Formulas(0) = gFormula0<br>&nbsp;&nbsp;&nbsp;mMain.CReport.Formulas(1) = gFormula1<br>&nbsp;&nbsp;&nbsp;mMain.CReport.PrintReport<br>&nbsp;&nbsp;&nbsp;If mMain.CReport.LastErrorNumber &lt;&gt; 0 Then<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PrintReport = False<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mMain.MousePointer = vbDefault<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MsgBox mMain.CReport.LastErrorNumber & &quot; : &quot; & mMain.CReport.ReportFileName & &quot; : &quot; & mMain.CReport.LastErrorString,&nbsp;&nbsp;vbInformation + vbOKOnly, &quot;Attention&quot;<br>&nbsp;&nbsp;&nbsp;End if <br>&nbsp;&nbsp;&nbsp;PrintReport = True<br>End Function<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top