Solved

Visual Basic.Net 2008 - Cannot Run Crystal Reports Viewer

Posted on 2008-06-19
12
1,503 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 
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 101

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

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.
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

724 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