cancel
Showing results for 
Search instead for 
Did you mean: 

apphangb

zeljko_mrcic
Explorer
0 Kudos

Hi

I have 20+ reports in my project. From time to time when user starts rpt preview app hangs. In error log I get "unknown".

I have tried:

loading one false report on app startup

uhchecked printer in report design printer options

selecting XPSwhen checked or unchecked in printer options(read it somewhere on this forum)

...nothing...still hangs

I'm using VS2010, x64 in development frmw 4

on clients I have different configurations, XP, W7, W8...

is there some patch or something. I will paste my code if necessary, but 97 of 100 previews are OK, so I guess it is not code.

thx

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello,

Are you using SP 13?

All I can suggest is wrapping all of your functions in a Try/Catch block and then getting/logging the error and/or inner exceptions:

catch (Exception ex)

{

    if (ex.Message.ToString() == "Object reference not set to an instance of an object.")

        MessageBox.Show("ERROR: Object reference not set to an instance of an object.");

    else

        if (ex.Message.ToString() == "External component has thrown an exception.")

        {

            MessageBox.Show("ERROR: External component has thrown an exception.");

        }

        else

        {

            {

                if (ex.InnerException.Message != null)

                {

                    MessageBox.Show("ERROR: " + ex.Message + " ;" + ex.InnerException.Message);

Don

zeljko_mrcic
Explorer
0 Kudos

try/catch is there by default

sp13? Nope. Is there something for users pc's?

0 Kudos

Crystal Report for Visual Studio

http://scn.sap.com/docs/DOC-7824

zeljko_mrcic
Explorer
0 Kudos

OK...it's been few days now and I thing I got it

uhchecking printer in report design printer options is not relevant because CR is always looking for printer listed in combobox.

When I developed reports I used LAN printer with //...

I guess CR is looking for that printer, can not find it and then goes for default printer.

Problem is when network is not available, CR get lost and I get app hang.


Now I selected XPS...

And problem gone. The only thing, even with uhchecked printer in report design printer options, CR shows XPS Save as dialog, so I have to manually delete XPS printer. That is not a problem since all PC's are using just my app.

I don't know if SP mentioned in Don's reply has some fix for this?

0 Kudos

Hello,

Crystal Reports ALWAYS required a default printer to be installed locally.

So are you now using Service Pack 13? I think the original release did have a problem where it searched the local Domain to find the printer but it should not using SP 13.

Don't use the XPS printer, it has problems and cause CR problems, it doesn't support landscape formatting.

And Check on Dissociate.... that way it no longer looks for the exact printer and simply looks for the same "family" of printers.

Don

zeljko_mrcic
Explorer
0 Kudos

should I check or uncheck Dissociate...?

Did SP13 has some other changes that can mess up my reports. I had some bad experience in past?

So what should I choose for default in combo for printer option?

0 Kudos

Check dissociate on.

Install a printer that I assume you reports are basic 8 1/2 x 11 so any printer that supports it.

A good place to start on how printing works is these WIKI's Ludek and I created:

http://scn.sap.com/docs/DOC-57979

Should explain what CR is looking for.

SDK then should work also.

Answers (0)