kamlesh lalwani
asked on
crystal report problem
when i print crystal report more then 75 times then it give error
Few points to check are:
The heap memory set for the underlying application as that might be an issue and report execution might have run out of memory when it was run for more than 75 times.
Couple of other things to check are:
1. Whether there is any permission issue to run the report. I think this is unlikely as you are able to run the report for 75 times.
2. To check whether there is any issue with the given path for the report and I guess this is also not an issue with your report since it is being executed.
The heap memory set for the underlying application as that might be an issue and report execution might have run out of memory when it was run for more than 75 times.
Couple of other things to check are:
1. Whether there is any permission issue to run the report. I think this is unlikely as you are able to run the report for 75 times.
2. To check whether there is any issue with the given path for the report and I guess this is also not an issue with your report since it is being executed.
It will also be helpful if you can copy and share the full error message from log file
do you properly close & dispose your report?
Here's relevant information from Ludek Uher at SAP:
-------------------------- ---------- ---------- ---------- ---------- ---------- ---
Crystal Reports Maximum Report Processing Jobs Limit
Developers using Crystal Reports in Visual Studio .NET web applications occasionally encounter the preset 75 print job limit. This article discusses possible solutions and work-arounds.
https://archive.sap.com/documents/docs/DOC-21533
https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/f053713e-3e3d-2c10-2a81-f79259e54023&overridelayout=true
--------------------------
Crystal Reports Maximum Report Processing Jobs Limit
Developers using Crystal Reports in Visual Studio .NET web applications occasionally encounter the preset 75 print job limit. This article discusses possible solutions and work-arounds.
https://archive.sap.com/documents/docs/DOC-21533
https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/f053713e-3e3d-2c10-2a81-f79259e54023&overridelayout=true
also check your temp folder and PrintJobLimit registry value as shown in https://remiware.co/2015/07/08/solving-the-load-report-failed-error/
Are you doing this from the Crystal designer or from a viewing application?
Are you printing from the print Icon or is it printing directly from code?
What version of Crystal?
mlmcc
Are you printing from the print Icon or is it printing directly from code?
What version of Crystal?
mlmcc
I DO ALL THINGS OF ABOVE BUT STILL THEIR IS A PROBLEM
This code create a problem if i open this crystal report more then 75 times..
MY CODE IS :
Try
cmd = New MySqlCommand("select * from bill_tbl", con)
sqlda = New MySqlDataAdapter(cmd)
sqlda.Fill(ds, "bill_tbl")
crystalReport.Load("E:\uni versal\sof tware\hote l rainbo\restaurent\restaure nt\report_ bill.rpt")
crystalReport.SetDataSourc e(ds)
CrystalReportViewer1.Repor tSource = crystalReport
CrystalReportViewer1.Refre sh()
Catch ex As Exception
Dim msg As String = ex.Message
End Try
crystalReport.PrintToPrint er(1, True, 0, 0)
ds.Dispose()
cmd.Dispose()
crystalReport.Clone()
crystalReport.Close()
crystalReport.Dispose()
GC.Collect()
ds.Clear()
Me.Close()
This code create a problem if i open this crystal report more then 75 times..
MY CODE IS :
Try
cmd = New MySqlCommand("select * from bill_tbl", con)
sqlda = New MySqlDataAdapter(cmd)
sqlda.Fill(ds, "bill_tbl")
crystalReport.Load("E:\uni
crystalReport.SetDataSourc
CrystalReportViewer1.Repor
CrystalReportViewer1.Refre
Catch ex As Exception
Dim msg As String = ex.Message
End Try
crystalReport.PrintToPrint
ds.Dispose()
cmd.Dispose()
crystalReport.Clone()
crystalReport.Close()
crystalReport.Dispose()
GC.Collect()
ds.Clear()
Me.Close()
why are you calling the Clone method (just before the Close)?
You have modified the registry?
You are clearing the temp folder?
You have modified the registry?
You are clearing the temp folder?
Yes i do.. but still probem
are you printing your reports in a loop? I would try to clean the temp folder in that loop. Add a counter to your loop (or use the modulo operator) and at 50 reports, cal this method:
Public Shared Sub DeleteCrystalTempFiles()
Dim strPath As String = IO.Path.GetTempPath
For Each f As String In IO.Directory.GetFiles(strPath, "*}.rpt")
Try
IO.File.Delete(f)
Trace.WriteLine("Crystal Report temp file " + f + " deleted.")
Catch ex As Exception
Trace.WriteLine("Failed to delete Crystal Report temp file " +
f + " (" + ex.ToString + ".")
End Try
Next
For Each f As String In IO.Directory.GetFiles(strPath, "~cpe{*}.tmp")
Try
IO.File.Delete(f)
Trace.WriteLine("Crystal Report temp file " + f + " deleted.")
Catch ex As Exception
Trace.WriteLine("Failed to delete Crystal Report temp file " +
f + " (" + ex.ToString + ".")
End Try
Next
End Sub
Is E: a mapped drive or a local drive?
Are there multiple copies of the report file?
mlmcc
Are there multiple copies of the report file?
mlmcc
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
What is the error message you get?
Can you share the screenshot of the error?