Crystal Viewer Print Locking

Good Morning

Experts:

I have a customer that is experiencing issues with locking up while printing reports via Crystal around the same time each day.  Preliminary thinking would lead us to perhaps "something" on their system causing a problem at the same time each day.  But, I want to throw the idea out, that perhaps repeated printing out of my applicaiton all day kind of takes a toll by afternoon.  

The application is VB.net.  I basically use the ReportDocument and attach it to the CrystalReportViewer object to print.  Here is the code:

'*********************************************
 'Attach ReportDocument to CrystalViewer object
'*********************************************
 Prt_ShowReport.CrystalReportViewer.ReportSource = LBSI_ShowReport.RD
 Prt_ShowReport.RD.Load(g_ReportFile)

Do I have to do "something" here to release the resources after each use?  Could repeated use of this code, without closing the application, possbily cause a problem?

I welcome questions to assist with what other information maybe needed to diagnose the issue.

Thanks,
Jimbo99999
Jimbo99999Asked:
Who is Participating?
 
frodomanCommented:
You can make sure that you dispose your ReportDocument object after it isn't needed any longer.  This should be happening anyway due to routine garbage collection unless your application doesn't have any subs and is one long block of continuously looping code.

The viewer shouldn't be a problem because it looks like you have a single viewer and just assign different sources to it.  If you are creating a new viewer every time then make sure you dispose of it also.
0
 
frodomanCommented:
I think it's much more likely something on their system or network causing the problem.  Potentially if your application is running all day and you repeatedly create ReportDocument objects without disposing of them or releasing them for garbage collection that it is remotely possible that this could be the cause of the problem.  I believe it extraordinarily unlikely however that even is this were the case that it would occur at the same time every day...
0
 
Jimbo99999Author Commented:
frodoman:

I agree with you there.  As a precaution, is this something that I can release or reset before each use?

Kind of like making sure all our ducks are in a row...

Thanks,
jimbo99999
0
 
Jimbo99999Author Commented:
Thanks for the help...

jimbo99999
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.