Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > Database and Reporting > Program not ending


Reply
 
Thread Tools Display Modes
  #1  
Old 10-09-2000, 12:56 AM
dusteater
Guest
 
Posts: n/a
Default Program not ending


I have a program and after I print some reports and then exit, I still have the program running in the background. To print the forms, I am using Data Report and calling the print routine like so:
rptSales.PrintReport
unload me

But the program doesn't end. If I do not print the reports then it ends...whats the problem? What am I missing?
Rick

Reply With Quote
  #2  
Old 10-09-2000, 04:35 AM
BillSoo's Avatar
BillSoo BillSoo is offline
Code Meister

Retired Moderator
* Guru *
 
Join Date: Aug 2000
Location: Vancouver, BC, Canada
Posts: 10,441
Default Re: Program not ending

The data report must be spawning a process which runs in a separate thread. This thread is keeping your program loaded, even when all forms are unloaded.

I don't use the data report but there must be a way to tell when it is finished an operation. I suggest you don't allow unloading until it is done. Alternatively, you can always put an END command in the unload event of your main form, but that is not always the best idea.

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
__________________
"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder
Reply With Quote
  #3  
Old 10-09-2000, 03:06 PM
dusteater
Guest
 
Posts: n/a
Default Re: Program not ending

Thanks Bill,
I figures it out. After I print the Report I have to unload each report. Thanks for your help!
Rick

Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->