cancel
Showing results for 
Search instead for 
Did you mean: 

Visual Studio .NET 2003 Crystal Reports Errors

Former Member
0 Kudos

We have a program that was developed in Visual Studio .NET 2003 using VB.

It has been running for at least 3 years without any errors on an IBM 346 server with Windows Server 2003 (at 12 different locations). When the server at one of the locations was replaced with a brand new HP ProLiant DL380 G6, we started getting some weird error messages.

Here are the errors that we see during the Printing of the reports:

System.NullReferenceException: Object reference not set to an instance of an object.

CrystalDecisions.CrystalReports.Engine.InvalidArgumentException: Error in File C:\DOCUME1\ADMINI1\LOCALS~1\Temp\temp_4f42305d-3c2a-4929-88e1-d2884e368c54.rpt:

Invalid printer specified.

Please note that the reports are printed on average four times an hour. The errors are intermittent. The printing could be fine for the first print job, the second one will generate one of the errors, and the third one right after could be fine. Each time the code is the same, just calling different report files.

Please help! I've been banging my head against the wall for weeks on this one! I've already upgraded the Crystal Reports Runtime on the affected server to the latest patch: CRNET11WIN (https://smpdl.sap-ag.de/~sapidp/012002523100006007652008E/crnet11win_en.pdf). This patch did help a little bit. I don't see the errors as often. Maybe once or twice every 2 days. It used be at least twice a day prior to this patch. We also had some other error message prior to applying this patch, which was:

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> CrystalDecisions.CrystalReports.Engine.InternalException: Error in File C:\DOCUME1\ADMINI1\LOCALS~1\Temp\temp_7a62bc6a-4940-4c9e-a9c6-fd85187eb944.rpt:

The request could not be submitted for background processing.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Compare the DLLs loading on a good server and the HP server. Look at the database client, framework and system files. Use [Modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip] to do the comparisons. I realize you are using the same code, b ut make sure you are closing and disposing the report objects.

Consider upgrading to CR XI r2. This would be a major change as you would have to recompile the app and do a new runtime distribution. CR XI r2 is here:

https://smpdl.sap-ag.de/~sapidp/012002523100006008462008E/crxir2.zip

Let me know if that is a possibility and I'll send you more info.

I am not sure if you are still getting both error messages, but have a look at [this|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50a6f5e8-8164-2b10-7ca4-b5089df76b33] article for possible clues.

Compare the printer drivers. If the default printer drivers are different, make sure you have the latest update on the HP box.

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Former Member
0 Kudos

blank

Edited by: mbolgar74 on Apr 12, 2010 11:13 PM

Former Member
0 Kudos

Ludek,

Thanks for the prompt response. Unfortunately, the old server that worked well for the past several years has been removed. I did see a post about having to close and dispose the report objects. This is something that I just recently tried with horrible results. The original code creates the report objects on application start, and only disposes them on application termination. When I added the code, to create the objects and then close/dispose after every print job, we started getting the following error messages (in addition to the InvalidArgumentException and NullReferenceException) about 2 or 3 times per hour (intermittently):

"System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> CrystalDecisions.CrystalReports.Engine.InternalException: Error in File C:\DOCUME1\ADMINI1\LOCALS~1\Temp\temp_c558caab-72fd-4fea-8e29-a9c2647db6fe.rpt:

The request could not be submitted for background processing."

What is involved in upgrading to CR XI r2? Can you give me instructions for both the dev enviornment and runtime environment? At this point I am almost up for anything if it will resolve the issue. The problem is that I can't reproduce this problem on my development box either...

I did see the article about "Troubleshooting the "Background Processing Error" Message". The only thing that I felt that applied was the close/dispose of the report objects, which I tried and had to back out. As well, the blurb about the .NET Framework stuff below:

Framework. Applications created on the 1.1 framework and deployed to computers where both framework 1.1 and 2.0 exist may result in the error. Crystal Reports assemblies for framework 1.1 are not compatible with framework 2.0. However by definition, the application will load the latest framework. This may be resolved by recompiling the application with 2.0 framework, or forcing the application to load framework 1.1 as described in the following Microsoft kbase:

http://msdn2.microsoft.com/en-us/library/65y5x3xf(vs.71).aspx

I did not convert the app to .NET 2.0, since I would need VS.NET 2005 for that. However, I did try to force the app to load .NET 1.1 Framework, but I'm not sure if I did this correctly or not. Since, it did not make any difference at all.

I can't compare the print drivers, since the old server is gone. However, we have tried a few different versions of the drivers (even different printers).

former_member183750
Active Contributor
0 Kudos

Using .Close and .Dispose is actually very critical. Without this, the app will eventually cause all kinds of errors and possibly even cause the server to become unresponsive.

I'm not sure why you'd be getting those errors - possibly because the report objects were being destroyed at the wrong time?

Re. upgrade to CR XI r2. Before installing CR XI r2, note the keycode for your current install. Then, uninstall CR XI r1. Install CR XI r2 from the link I provided in the previous post. Use the r1 keycode when requested by the r2 install. Once that is done, apply SP 6 from here:

https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe

msm for Sp6 is here:

https://smpdl.sap-ag.de/~sapidp/012002523100000634042010E/crxir2sp6_net_mm.zip

and msi is here:

https://smpdl.sap-ag.de/~sapidp/012002523100000633302010E/crxir2sp6_net_si.zip

Your CR assemblies for .NET will be version 11.5.x. Just from experience, if you have the CR viewer on your form, delete it and re-add it, just to make sure we are using the r2 viewer.

Re. Framework. CR XI r1 does not work with framework 2.x. So, if there is framework 2.x your app will use it, but CR XI r1 assemblies will cause issues. So for framework 2.x, you certainly want to use CR XI r2. Perhaps that is where most of the issues are coming from(?).

So, I think going to r2 will be a really good idea as well as adding .Close and .Dispose. Then we'll see...

Ludek

Former Member
0 Kudos

Ludek,

I'm going to attempt a couple of things:

(1) I'm going to ask the site to uninstall .NET Framework 2.0 from their server and see what happens with the program as is.

(2) I'd like to pursue upgrading to CR XI r2. Two quick questions: How can I uninstall CR XI r1 ? The only thing I have to do with Crystal Reports on my development box is Visual Studio .NET 2003 Pro (which includes Crystal Reports). Unless I'm missing something?? I do not have any other Crystal Reports software. Also, if I include the MSMs in my project, does that mean that I do not need to install the MSI on the target computer? Which way do you recommend going - install MSI on target, or include MSMs in deployment project?

former_member183750
Active Contributor
0 Kudos

There is something not right / confusing here. On the one hand, you say you have CR XI, on the other you say;

"The only thing I have to do with Crystal Reports on my development box is Visual Studio .NET 2003 Pro (which includes Crystal Reports). "

If you only have CR that bundled with .NET 2003, then you are using CR 9. What is the version of the CR assembly crystaldecisions.crystalreports.engine that is being referenced in your project?

if I include the MSMs in my project, does that mean that I do not need to install the MSI on the target computer?

- that is correct

Which way do you recommend going - install MSI on target, or include MSMs in deployment project?

- typically, msi is done on server based apps where you do not need some pretty install splash screens etc.

But let's figure out what version of CR you are actually using first.

Ludek

Former Member
0 Kudos

Ludek,

I'm not sure when I mentioned anything about CR XI... It is true that I only have the Crystal Reports that is bundled with VS.NET 2003.

The crystaldecisions.crystalreports.engine version is: 9.1.5000.0 ... when I do the following command:

MsgBox(GetType(CrystalDecisions.CrystalReports.Engine.Database).Assembly.GetName.Version().ToString)

former_member183750
Active Contributor
0 Kudos

OK. So somewhere we went a bit sideways here.

Since you're on CR 9.1, we'll have to forget about the going to CR XI R2 option.

With CR 9.1, one thing to make sure is that you've got SP1:

https://smpdl.sap-ag.de/~sapidp/012002523100009301312009E/crnet11win_en.zip

I also think we want to go after the framework 1 / framework 2 issue. Yo can run this app with both frameworks on the box, but you'll have to tell it to use framework 1.x explicitly. See [this|http://msdn2.microsoft.com/en-us/library/65y5x3xf(vs.71).aspx] kbase on how to do that.

Ludek

Former Member
0 Kudos

Ludek,

Thank you for sticking with me so far...

Alright, so I'll ignore the CR XI stuff we talked about.

We do have the SP1 installed, as I mentioned in my initial post... it did help to reduce the number of occurrences of the problem, but did not eliminate it.

I did also create the .config file for this app, which did not help. However, I'm not positive I did it correctly... Is this something you could steer me in the right direction with? This is the contents of the .config file that I have:

<?xml version ="1.0"?>

<configuration>

<startup>

<supportedRuntime version="v1.1.4322" />

</startup>

</configuration>

Thanks, again for all your help so far!

Mike

former_member183750
Active Contributor
0 Kudos

All I had in a config file when I fooled around with this was:

<configuration>

<startup>

<supportedRuntime version="v1.1.4322" />

</startup>

</configuration

But I don't think that will make a diff. Make sure the file is called myapp.exe.config (or what ever your app is called.)

What is the name of the printer you are using?

You mention the app was working on 12 different locations. All of these have been taken down? Bummer if they have. I'd love to run Modules on one of those.

Ludek

Former Member
0 Kudos

Ludek,

I do still have 10 other sites where the application is running flawlessly. Only 2 of them have this issue. One of the 2 problem sites is the one that just got upgraded to the new server, the other one is the newest site which already had a newer server. I guess we could try running the "modules" utility on one of the good sites and comparing to one of the problem ones...

How do I use the modules util?

As for the printers... I don't think we have 2 sites that have the same printers... They're all different. Let's call the problem site "SITE 1", and a good site "SITE 2". Here are the printers for both sites:

SITE 1:

HP LJ P3005

HP LJ 8150

SITE 2:

HP LJ 4100

former_member183750
Active Contributor
0 Kudos

Looking at the drivers, ensure that the one for HP LJ P3005 is of version 61.074.561.43 (5 May 2008) and HP LJ 8150 (HP LaserJet 8150 PostScript Driver ?) is of version 61.063.461.42 (16 Jul 2007).

Re. Modules:

1) Have a copy on a good and bad server

2) Start modules on a good server

3) Run the app and get a report processed - leave the app running

4) Go back to Modules

5) Go to File menu, select New List -> Memory Modules

6) Save as good.mdl

7) Repeat on the bad server

😎 Open both good and bad mdl in one view

9) Compare (Module menu | Differences)

Ludek

Former Member
0 Kudos

I will have to check on the printer drivers in a bit... They both use PCL drivers, not PS.

I ran the Modules utility and did the compare. Obviously there appears to be a lot of differences, since on the BAD server I have SP1 for Crystal Reports Runtime, and the GOOD one does not have SP1. SP1 was installed in an attempt to resolve the issues. I believe the other BAD server I have does not have SP1, I'll see if I can run the Modules on that one.

I have uploaded a copy of the modules diffs here: [http://wikisend.com/download/445294/goodbad.mdd|http://wikisend.com/download/445294/goodbad.mdd]

I looked at it, but it doesn't tell me much other than that I have 2 different versions of Crystal Reports Runtime...

Thanks,

Mike

former_member183750
Active Contributor
0 Kudos

Ok. Do look at the printer drivers and visit HP to see if they have more up to date drivers than what is being used. This really is important and not a stalling tactic.

Looking at the modules comparison, the framework checks out. The CR file differences I would not be too concerned about. But I did see that the DAO engine on the bad server is older. E.g.; DAO360.dll on the bad server is of version 3.60.9503.0, but the good server uses 3.60.9512.0. It would be interesting to see how things go with the same DAO engine version.

Former Member
0 Kudos

Ludek,

They have the following printer driver:

The HP LaserJet P3005 PCL 6 Driver Version is: 3/18/2008,61.74.561.43

The HP LaserJet 8150 - I couldn't figure out how to get the driver version of this one. However, both printers are experiencing the same issue, so I think we can assume the drivers are not the root cause.

Regarding the DAO360.DLL... I have run the Modules util on 6 more servers. They all had the same version of the DAO360.DLL as the bad server... The only one that is different, is the "good" one that I happened to pick yesterday. Anyways, I don't believe this is not the root cause. What I DID notice is that the "SHELL32.DLL" is older on BOTH bad servers than it is on the other 6 good servers.

Both bad servers have this version of SHELL32.DLL: 6.00.3790.4184 (srv03_sp2_gdr.071106-1258)

All other good servers have this version: 6.00.3790.4315 (srv03_sp2_gdr.080617-1232)

Another file worth mentioning is the UNIDRV.DLL and UNIDRVUI.DLL... Both bad servers have a new version of these files... and most (not all) good servers have an older version.

What are your thoughts regarding these findings??

Please let me know.

Thanks,

Mike

former_member183750
Active Contributor
0 Kudos

No, nothing. That's all fine then. E.g.; we do not have any consistent differences and I certainly would not want to fool around with files like SHELL32.DLL.

As lame as it sounds, see if reinstalling the driver will help...

Other than that, it may help to talk to someone:

http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryI...

It may even be that we'll need to get an image of the server here and have a look...

Ludek

Former Member
0 Kudos

Ludek,

Sorry for the delay in responding...

I have identified the Windows Hotfix that updates the SHELL32.DLL and asked the site to install this update. I know it may not help, but all sites must have the same Hotfixes anyways. This will be applied on April 24.

Ok, I see that I may need to pay for support, which seems somewhat unfair, especially if this turns out to be a Crystal Reports bug. I will wait until after the SHELL32.DLL is updated to see if that makes a difference.

The task of getting an image sent for review is possible. Is this something that you would like to get, or am I going to have to work with Business Objects once I have paid for support?

Thanks,

Mike

former_member183750
Active Contributor
0 Kudos

If this turns out to be a CR bug, you will get a refund, so no worries there.

Re. image. Once you have a phone case created the technician may ask for the image. But that will be up to them.

Ludek

Answers (0)