troubleshooting Question

How to close crystal report object? PLS HELP

Avatar of AnnaJames77
AnnaJames77 asked on
Crystal ReportsASP.NETVisual Basic.NET
12 Comments1 Solution388 ViewsLast Modified:
Public Sub ShowReport(ByVal OrderNo)
        Try
            Dim theReport As New ReportDocument
            theReport.FileName = "C:\Results.rpt"
            theReport.SetParameterValue("@orderno", OrderNo)
            CrystalReportViewer1.ReportSource = theReport
            CrystalReportViewer1.Visible = True
        Catch ex As Exception
            MsgBox("An Error Occurred: " & ex.ToString())      
        End Try

I call the above code from another form as Rep.show(parameters) in a loop;
ie
for loop
Rep.show(parameters)
end for

I want to know how should i close and dispose the report object ie, theReport.
As i get an error as below
"The maximum report processing jobs limit configured by your
system administrator has been reached.How I can Solve this
problem when i using crystal report to load from my
application."
in google its suggested to close the report object. But when i give the thereport.close and thereport.dispose it gives an error  like "Pure Virtual Function Call"
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 12 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 12 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros