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

x
?
Solved

Is it safe to terminate a thread that is opening a cyrstal report?

Posted on 2005-04-16
3
Medium Priority
?
214 Views
Last Modified: 2010-04-23
I have a VB.NET windows application which kicks off a crystal report viewer and passes a crystal report object with a recordset to that viewer.

Sometimes this takes a long time. I would like to allow the user to cancel the report if they would like.

I plan to create the report in a second thread, and if the user hits a "Cancel" button, then the report creation process is cancelled. Will this have any negative effects on the client machine? Will it create orphaned files? Will it take up memory? Or will .NET magically clean up everything for me, and make it safe to terminate the thread before it is finished?


thanks so much for your help!
0
Comment
Question by:brokeMyLegBiking
  • 2
3 Comments
 
LVL 27

Expert Comment

by:planocz
ID: 13806494
I would like to see your code on this one. In vb.Net there is no need to use recordsets, you should use datasets and you may need to pass Parameter Fields to the CR report.
"Sometimes this takes a long time ".... if it is taking that long to run there may be a better way to code this. Then you will not need to use threading.
0
 
LVL 4

Author Comment

by:brokeMyLegBiking
ID: 13806533
I am using DataSets.  

The Access database is 1 gig. So it is a huge database. That is why it is sometimes slow.

I guess I need to understand what processes Crystal reports starts when it creates a report, and if it creates any temporary files that I need to delete when I end the process before it is finished.



0
 
LVL 27

Accepted Solution

by:
planocz earned 1500 total points
ID: 13806766
I sounds like you may need to focus on using SQL statements in your CR report to split up the info that is coming in from the database. May be taking to long to search and retreive info..
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

569 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