Solved

Visual Basic.Net 2008 - Cannot Run Crystal Reports Viewer

Posted on 2008-06-19
12
1,491 Views
Last Modified: 2013-11-26
We have an application that we migrated from Visual Basic 6.0 to Visual Studio.Net 2008 Professional using the migration wizard.  The app contains 540 forms.  We used Component One's True DBGrid 8.0 in the VB6 app, but the migration tool did not migrate those grids.  The migration wizard replaced them all with empty, unformatted, unbound VB.Net data grids.  So we had to delete the unformatted data grids and rebuild 98 True DB grids in the app.  The app uses SQL Server 2005 for stored databases and a mixture of SQL Server and MS Access tables as the underlying table for grids and as the input tables for Crystal Reports.

The problem we are having at the moment is as follows:  If we open the app and go to an application function that uses the Crystal Report Viewer - like a simple 20-line table listing - the report is generated in a reasonable period of time considering that it is the first time the report (or any report) was generated in this session.  If we press the printer icon to print the report, printer selection is very slow to pop up and the printing of the one page report is also very slow.  If we then go back and request the same report again, the report takes longer to generate and printing (if it works) is even slower than it was on the first request.  Screen painting of the menu screen is normally very fast, but is now very slow and fragmented.  If we try a third time, we never even get to request the report.  the app hangs as soon as we click on the menu icon to open the screen.

The same thing happens if we try to switch from one Crystal Report request to another while in the same session.  We end up having to reboot the PC to get it back up and running.  There is no way to cancel the task (task manager is non-responsive).

The CPU utilization is always at 100% as soon as the app is started and remains at 100% throughout the session.

We also tried the same app under VS.Net 2005 - similar results.

We are now using Crystal Reports 2008.  We have had the exact same problem with CR 10, XI, and X1 R2.

We are running VS.Net 2008 Professional with the SP1 Beta installed and MS.Net Framework 3.5 with SP1 Beta installed as well.

The reports are generated and printed quickly and correctly directly from CR 2008 - the problems only occur when generated from the VB app.

The app works perfectly under VB6/SQL Server 2000 and CR 10.

Any thoughts or suggestions on how to make the Crystal Viewer work properly and repeatedly?
0
Comment
Question by:portdata
  • 6
  • 5
12 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 21830087
First things first, migrating from VB6 is problematic at best.  Secondly, it often leaves projects in a unusable state for a long time, cleaning up the mess it makes.  Sometimes, if you take a step back and look at it, the .NET way would be better, but it takes time to learn that way.  

Are these simple reports, or complex?  What happens if you create a new .NET project, and just try implementing the report viewer, without all the other noise involved in the solution?
0
 

Author Comment

by:portdata
ID: 21830193
Thanks for the reply.

I created a new project last night with only a simple menu form and two simple Crystal Reports apps forms - they both just select a few records from a SQL database, create an MS Access data source for the Crystal Report and invoke the Crystal Reports Viewer.

The first time the report is generated reasonably quickly.  Printing is sluggish (only one page to print) but it works.  I then clicked on the other item (a second one page report shoudl be displayed) and it just hangs.  The CPU utilization is at 100%.  I cannot run task manager.  I cannot do anything at all.  My computer (a Dual Core Del Optiplex with 2.66 GHz processors and 2 GB or RAM) running nothing else is dead in the water.  I have to power off the PC to get it restarted.  This PC is running Windows XP Pro.

I can always get it to produce a Crystal Report once, but never second one.  It behaves like there is a serious memory leak or that the first execution never really finishes.

Even the video displays get messed up - screen display becomes very slow and fragmented as well after the first Crystal invocation.

My next test for today is to install the app on one of our Vista Ultimate machines to see if anything changes.
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 21830270
Are you using Crystal Reports that you purchased, and not the version that comes with Visual Studio.NET?
0
 

Author Comment

by:portdata
ID: 21835665
Yes - a purchased version
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 21835898
Ok, I haven't used the Crystal Reports outside of the IDE, so I can't really comment on what is happening, but as often happens with Crystal Reports, it sounds like a pretty serious bug.
0
 

Author Comment

by:portdata
ID: 21835903
I was just looking to see how to choose the Crystal Reports Basic that comes with the IDE.  Do you happen to  know how to choose that one?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 96

Expert Comment

by:Bob Learned
ID: 21835910
If you already have a report defined, you can double click on it, in the Solution Explorer, and it should open the report in the IDE.  You will more than likely have to register the software before you can run it.
0
 

Author Comment

by:portdata
ID: 21835995
Since I already have Crystal Reports 10, XI R2  and 2008 installed on my PC, it opens without any problem.  But when I try to run it more than once, it hangs.

I tried deleting all Crystal Reports references and then added an existing report to the solution explorer.  It automatically added Crystal Reports references, but it picked a few from 2008 and a few from XI R2, but the .Net 1.0 version, not 2.0.

I am really getting to hate this problem.

I am going to try installing the Crystal Reports Basic that is bundled with VS.Net 2008 and see if that makes any difference.
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 250 total points
ID: 21836303
Are you closing the reports?

Are you cleaning up the viewer and the report objects?

mlmcc
0
 
LVL 96

Assisted Solution

by:Bob Learned
Bob Learned earned 250 total points
ID: 21837237
>>We are running VS.Net 2008 Professional with the SP1 Beta installed and MS.Net Framework 3.5 with SP1 Beta installed as well
There is no telling what impact installing Betas has on the situation.
0
 

Author Comment

by:portdata
ID: 21837436
To answer mimcc:

No, all we are doing is invoking the report viewer to generate the report.
I will have to find out what commands I need to do the cleanup you suggest.
I am really lousy and careless about object cleanup.

portdata
0
 

Author Closing Comment

by:portdata
ID: 31468953
Thanks to both TheLearnedOne and mimcc for your time and effort.  The problem appears to be a problem with my Windows XP development machine, or the installation of VS.Net 2008 on that machine, but your thoughts are what inspired me to try the app on my Vista notebook, and that's worth 500 points any day!
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

708 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now