**Using Visual Studio 2005 and Crystal Reports XI Release 2 Developer
Edition.
I currently have a multi-threaded C# application that loads a Crystal
Report at runtime, fills out the necessary parameters and then exports
the file to disk.
I export around 5000 reports a day, in about 3 hours (nightly runs of
the day's transactions), but sometimes, without warning or any debug
info, the application locks-up using 100% of the processor and becomes
completely unresponsive. No more reports are loaded or exported.
***It is soo unresponsive that if i actually click 'PAUSE' in visual
studio, my processor continues to use 100% of the cpu.*** (only time I
have ever seen this) I know Crystal Reports has some legacy COM
objects, and I have been doing research on COM Interop functions, but
nothing has helped.
I have run out of options at this point. Like I said, it doesn't
always happen, it isn't any report in particular, but I would say at
least 1/3 of the time the process will go to 100% CPU utilization
before it completes all 5000 reports. I have let it run for 30 minutes
in hopes it will get out of whatever loop it is stuck inside, but it
never does. Normally reports take about 10 seconds to export, so 30
minutes is a good indication it has locked up.
Then I get the enjoyment of starting the program all over again and
explaining to my boss why I shouldn't be fired :(
I would even accept 'unsafe' code at this point, i need to KILL
whatever is using 100% of my processor and RELOAD without restarting
the entire process.
Here is the segment which exports the report:
try
{
// clone the report from the global array (loaded individually
before, but still caused
// random 100% cpu usage)
reportDoc = (ReportDocument )config.RPTS[counter].Clone();
reportDoc.SetPa rameterValue("S ETTDATE", DATE);
// setup parameters
reportDoc.SetPa rameterValue("R T", this.DDName);
reportDoc.SetDa tabaseLogon(con fig.DSNUserName ,
config.DSNPassw ord);
// SetupExportOpti ons simply defines a text file with 16
characters per inch output
ExportOptions exportOpts = SetupExportOpti ons(counter);
reportDoc.Expor t(exportOpts);
}
catch (ThreadAbortExc eption threadAbortExce ption)
{
//Do Nothing, let it cycle its way back up the chain
}
catch (Exception e)
{
if (e.Message == "Database logon failed.")
{
Console.WriteLi ne(" Server Busy - Waiting to Retry ( " +
this.DDName + " - " + config.reports[counter].Substring(3, 4) + " )
");
continue;
}
Console.WriteLi ne("\n\nFailed in ExportReport: " + DDName + " -
" + e.ToString());
return;
}
reportDoc.Close ();
reportDoc.Dispo se(); 1 3290
Hi,
How you load your reports?
Obviously the code you posted is inside a loop, how the loop looks like?
How you have your reports stored? as files?
I would load one report at a time, run it and then make sure I call Dispose
of any instance that implements IDisposable.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
<st**********@g mail.com> wrote in message
news:11******** **************@ b68g2000cwa.goo glegroups.com.. . **Using Visual Studio 2005 and Crystal Reports XI Release 2 Developer Edition.
I currently have a multi-threaded C# application that loads a Crystal Report at runtime, fills out the necessary parameters and then exports the file to disk.
I export around 5000 reports a day, in about 3 hours (nightly runs of the day's transactions), but sometimes, without warning or any debug info, the application locks-up using 100% of the processor and becomes completely unresponsive. No more reports are loaded or exported.
***It is soo unresponsive that if i actually click 'PAUSE' in visual studio, my processor continues to use 100% of the cpu.*** (only time I have ever seen this) I know Crystal Reports has some legacy COM objects, and I have been doing research on COM Interop functions, but nothing has helped.
I have run out of options at this point. Like I said, it doesn't always happen, it isn't any report in particular, but I would say at least 1/3 of the time the process will go to 100% CPU utilization before it completes all 5000 reports. I have let it run for 30 minutes in hopes it will get out of whatever loop it is stuck inside, but it never does. Normally reports take about 10 seconds to export, so 30 minutes is a good indication it has locked up.
Then I get the enjoyment of starting the program all over again and explaining to my boss why I shouldn't be fired :(
I would even accept 'unsafe' code at this point, i need to KILL whatever is using 100% of my processor and RELOAD without restarting the entire process.
Here is the segment which exports the report:
try { // clone the report from the global array (loaded individually before, but still caused // random 100% cpu usage) reportDoc = (ReportDocument )config.RPTS[counter].Clone(); reportDoc.SetPa rameterValue("S ETTDATE", DATE);
// setup parameters reportDoc.SetPa rameterValue("R T", this.DDName); reportDoc.SetDa tabaseLogon(con fig.DSNUserName , config.DSNPassw ord);
// SetupExportOpti ons simply defines a text file with 16 characters per inch output ExportOptions exportOpts = SetupExportOpti ons(counter); reportDoc.Expor t(exportOpts); } catch (ThreadAbortExc eption threadAbortExce ption) { //Do Nothing, let it cycle its way back up the chain } catch (Exception e) { if (e.Message == "Database logon failed.") { Console.WriteLi ne(" Server Busy - Waiting to Retry ( " + this.DDName + " - " + config.reports[counter].Substring(3, 4) + " ) "); continue; } Console.WriteLi ne("\n\nFailed in ExportReport: " + DDName + " - " + e.ToString()); return; } reportDoc.Close (); reportDoc.Dispo se(); This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Dave |
last post by:
I know there is some Crystal Reports functionality in .NET but I was
wondering if it was possible to actually schedule Crystal Reports
dynamically using csharp code and/or generate reports dynamically by
pulling parameters from the database. I am not that familiar with
Crystal but we have 3 report templates and we'd like to schedule (via
Crystal's scheduling capabilities) or dynamically generate to create
about 100 variations of these...
|
by: http://www.visual-basic-data-mining.net/forum |
last post by:
Hi,
I wrote a program in VB.Net 2003. The program includes some reports made
with Crystal Reports for Visual Studio.Net 2003.
On my computer (with Win XP Pro) the program runs as it should do.
When I install the program on another computer with Win XP, everything is
still OK.
But when I install the program on a computer with Win 98 (and with
|
by: Robert Schuldenfrei |
last post by:
Hello NG,
After a bit of a wait my bookstore, SoftPro of Waltham, MA, got in the Brian
Bischof book: Crystal Reports .NET Programming. I have read a few books on
CR, but I am very new to it, C#, and SQL. The book is excellent.
Undaunted, I have plowed into a conversion of my old COBOL ERP system,
MCS-3, into C#. I have quite a bit of Inventory Control done and working.
For reports I am trying to use CR. I have a half a dozen of them...
|
by: Robert Schuldenfrei |
last post by:
Dear NG,
I am learning more about Crystal Reports (CR) running under .NET. Please
find my latest code at the end of this post. Here are my issues:
First, and most important, is Crystal Reports (CR) the right tool for
printing reports? I have well over 100 reports in my application and I
would like to use the best tool for the job.
Second, if CR is the right tool, am I using it correctly? Because it was
|
by: Sink |
last post by:
Hi,
Looking at reporting tools and was wondering if
anyone else has gone thru this. Crystal seems rediculously
expensive once you take into account licensing, while
Active is runtime-free meaning only developer licenses.
On a cost only basis, it seems pretty obvious but
what about feature wise. I simply do not have enough
time to do a drawn-out analysis and was wondering if
anyone else had.
Regards
| |
by: Peter Proost |
last post by:
Hi Group,
I've got an interesting problem, I don't know if this is the right group but
I think so because everything I've read about it so far says it's a .net
problem. Here's the problem, we're using crystal reports 9 and vb.net and
we're using the crystalrepotViewer to show our reports. But every time we
open a report the connection to or sql server remains, so if I open 5 forms
with the report viewer I've got 5 sleeping connections in...
|
by: Jay |
last post by:
I am getting mixed messages from the asp.net website hosting providers - some
say they do not support Crystal Reports due to a $25,000 per cpu licensing
fee, others say all I need to do is install Crystal Reports XI (about $500)
on a dedicated server and it will run fine.
Will Reports developed with the embeded Crystal Reports in VS 2005 run in a
Crystal Reports XI environment?
--
Thanks
|
by: Altman |
last post by:
I am currently using ASP.Net 2003 and will be upgrading to 2005
sometime in the near future. I have been having issues with using
Crystal Reports that were included with .Net to handle my reporting
needs. I was wondering if anybody has an opinion on how the new
reportViewer control works in comparison to Crystal. One of the main
problems I have been having with Crystal Reports is that they seem to
load very slow no matter how small the...
|
by: jvskarthick |
last post by:
Hi
I am very new to crystal reports at present I am working with Crystal reports actually my requirement is, I have to create verity of reports more then 100 reports. After creating the reports if the client wants to change the Font size from 10 to 11 or one type of Font to another type of Font in all reports means, I have to open each and every report and need to do the changes instead of that I want to create the common style sheet (CSS) and...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| | |