cancel
Showing results for 
Search instead for 
Did you mean: 

Crash when printing crystal reports 11.5

Former Member
0 Kudos

We have upgraded from access to sql server 2005 and from crystal 8.5 to crystal 11.5 using visual basic and have found that when the reports are printed it crashes and closes down the program with no error message.

This happens on reports created from scratch in 11.5 and converted from 8.5 reports.

i have put an error message in CrystalActiveXReportViewer1_OnReportSourceError but it gets bypasses. i can't get it to error in debug mode it only seems to crash when the .exe is run.

Can anyone help?

Accepted Solutions (1)

Accepted Solutions (1)

patrick_genest
Advisor
Advisor
0 Kudos

Hi Robert,

To troubleshoot this issue I will suggest to:

1. Open one of the sample report in Crystal Reports XI R2, and print it to the same printer.

Does it work?

( If it works, then try with one of your report... If it doesn't work, try to use a different printer

or verify if there is an update to the printer driver you used. )

2. If the report prints in Crystal Reports XI R2 designer, then it could be an issue with the application.

Test your application on different computers, and different printers to see if it's not specific to one

computer or printer.

Since you are developing an application that uses Crystal Reports, I transfered your post to the .Net Development - Crystal Reports forum. They might have more tips on how to troubleshoot the issue you are experiencing from a programming point of view.

Former Member
0 Kudos

Thanks for your reply

the problem is complicated by the fact that most of the time it prints fine on different computers and different printers, but our department that are running the reports get about 2-3 crashes per day so it takes a while to confirm if something has worked or not.

I also did manage to get it to crash on my machine today so it also crashes in debug mode so it doesn't seem to be a runtime problem.

It only happens when they print which is by calling report.PrintOut False, which i have changed to report.PrintOutEx False to see if that makes any difference. They have never had it crash from print preview and then print.

i have build a new exe so i will see if they still get any crashes.

0 Kudos

Hi Robert,

Try a different printer if you can or go to their web site and install the latest driver. There are know issues with various print drivers returning the wrong info to CR and causing crashes.

Next option is to go to microsofts web site and download a tool called WINDiag. You can set it up to capture memory and thread leaks or crashes. You won't have access to CR resources but if there is an issue in any other dll or dependency it may show you where. Select a Crash and select your EXE and let it go an try to crash it and wait for the dump file to generate.

Usually the first section indicates where the issue is.

Thanks

Don

Former Member
0 Kudos

I was wondering if a solution was ever found for this?

I'm having a very simular issue in that when the .printout method is called the code "hangs" at that point with no error messages or events. The problem is very sporadic. The app will run for days/weeks with no problems and at some sites it never has problems.

It's very frustrating that the .printout methout doesn't appear to have a timeout or raise any errors or windows event when this situation occurs.

0 Kudos

Hi David,

This posting has been marked as resolved so no one is going to be looking at it anymore. please post a new question so everyone can see it.

It's likely due to a memory leak in your app. Make sure you dispose of the all abjects you create and especially the report object. It's not always CR that leaks, we've actually fixed all that have been reported to us in the RDC engine.

Likely it's a leak in the printer driver. There are various tools to dig deeper into the cause. WinDiag, Filemon etc.

Thank you

Don

Former Member
0 Kudos

Hi Don,

Silly me! I assumed the question was unaswered since there is in very large text "This question is not answered" at the top of the thread!

I was also looking for confirmation from Robert that one of the suggestions actually solved the problem.

Thanks for the feedback anyway.

I can assure you this is NOT a memory leak issue on the CR or App side, so I'll pursue the printer driver and verify that the latest Service pack is being used.

If I find one of the suggestions that works I'll let you know.

Answers (2)

Answers (2)

former_member183750
Active Contributor
0 Kudos

The most important thing is to ensure the report prints from the CR designer. Then, ensure the app works on your development system. Then make sure you are working with the latest Service pack from here:

https://smpdl.sap-ag.de/~sapidp/012002523100006255422008E/crxir2_sp4_inc.exe

If the issue is only happening on a deployed system, ensure the runtime matches the development system. You can use the modules utility to check that:

https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip

Next. There have been a lot of changes from CR 8.5 to CR XI r2. See if you can recreate the issue with a new app. Simple app; load a report, print it (start with a saved data report, then add database logon - more on this below.)

In CR XI r2 you will have to use the connection properties bag. More info on this is here:

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00635998-751e-2b10-9cba-f50ee1e4...

If your app is not using connection properties, I'd recommend changing the code.

BTW. as this is an RDC issue, if you have any other queries unrelated to this thread, post to the Legacy Application Development SDKs forum at:

But let's keep this thread here for now.

Ludek

Moved to Legacy forums.

Edited by: Don Williams on Sep 24, 2008 11:19 AM

Former Member
0 Kudos

Thanks for your suggestions i will download sp4 tonight.

the problem is complicated by the fact that most of the time it prints fine, but our department that are runnin gthe reports get about 2-3 crashes per day so it takes a while to confirm if something has worked or not.

I also did manage to get it to crash on my machine today so it also crashes in debug mode so it doesn't seem to be a runtime problem.

It only happens when they print which is by calling report.PrintOut False, which i have changed to report.PrintOutEx False to see if that makes any difference. They have never had it crash from print preview and then print.

i have been looking at ConnectionProperties and have done the delete all to clear it out, but we build up a record set and set a where clause and then set that in CrystalReport.Database.SetDataSource rrstReport.

i have build a new exe so i will see if they still get any crashes.

former_member203619
Contributor
0 Kudos

Hi Robert,

The fact that it crashes on both newly created reports and on upgraded reports indicates to me that it is not an issue with the reports - but rather an issue with the runtimes. Most likely what has happened here is that there are some old / bad references left around and they are interfering.

I would recommend double-checking all your references and make sure that they are updated. You can also try creating a new simple program with just a viewer and try viewing the reports in that.

Shawn