Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Crystal Viewer Print Locking

Posted on 2007-08-09
4
Medium Priority
?
150 Views
Last Modified: 2010-04-23
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
0
Comment
Question by:Jimbo99999
  • 2
  • 2
4 Comments
 
LVL 42

Expert Comment

by:frodoman
ID: 19661734
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
 

Author Comment

by:Jimbo99999
ID: 19661903
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
 
LVL 42

Accepted Solution

by:
frodoman earned 2000 total points
ID: 19662206
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
 

Author Comment

by:Jimbo99999
ID: 19662271
Thanks for the help...

jimbo99999
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question