.Net Crystal Report printing application running on termianal service connection errors when session is disconnected

730

Solution 1

Our particular problem has been solved. Basically when the reports were created they were saved with information about printers. Basically a particular printer had been set for the report and saved.

This printer no longer exists which is why the report had started failing. Basically we had to open the report designer and remove any association with printers in the report.

Solution 2

We have encountered these errors several times in the past few years. Many times I wished for some more specific error message.

First, I would verify that there aren't multiple Crystal Reports versions installed. In our expereince, we found that Crystal Reports 9.0 doesn't seem to play well with 10. Uninstalling version 9 seemed to help some of our customers. If both are installed, I highlly recommend uninstalling both, then re-installing Crystal Reports 10.

One of our earliest Crystal Reports errors was the dreaded "The request could not be submitted for background processing." Reports would work fine for a while, then suddenly they would stop. After looking at the code, I found a place where we were not disposing of a ReportDocument. Correctly disposing this document fixed the issue.

Lately, we hit a spat of "The request could not be submitted for background processing." and "Invalid Printer" errors. One customer's server had several network printers defined by IP address. Printing would work just fine for a while, then suddenly, bam, the customer got the "Invalid Printer" error and called our support.

A fellow developer fixed the "Invalid Printer" problem by doing all of the following things:

  1. Edit and save the .rpt file in Visual Studio 2005. We had been keeping the report format compatible with Crystal Reports 9, because we wanted our changes to be distributable to our customers still using older versions.
  2. Save Crystal Reports files with the "No Printer" option. From the Visual Studio 2005 menu, select Crystal Reports/Design/Printer Setup, then select the "No Printer" check box.
  3. We changed a formula that displayed "Page N of M" from something strange like this:

"Page " + Left (CStr (PageNumber), Length (CStr (PageNumber)) - 3) +
" of " + Left (CStr (TotalPageCount), Length (CStr (TotalPageCount)) - 3)

to this:

"Page " + CStr(PageNumber,0) + " of " + CStr(TotalPageCount,0)

Unfortunately, I have no idea which (any or all) of the above actions may fixed the error. I say "may", because for all I know, the error magically went away because of some IT network change.

Finally, have you read this white paper? While it did not necessarily solve our problems, it was very interesting.

Share:
730
itgeek
Author by

itgeek

Updated on June 28, 2022

Comments

  • itgeek
    itgeek over 1 year

    how to authenticate to confluence page using python script. I need to login to confluence page using python script, and export a page to zip/csv.

  • Guilherme
    Guilherme almost 15 years
    I have created a number of windows services in the past, but thanks for the link. The application is definitely running, as not every request fails. We also have other apps running on there without a problem. This seems to be Crystal Reports specific.
  • Guilherme
    Guilherme almost 15 years
    Definitely disconnecting, other apps are running on there. Also that is kind of eliminated with the Windows Service, so perhaps its nothing to do with the terminal services!
  • Guilherme
    Guilherme over 14 years
    Hi I appreciate the answer but neither of the possibilities you mentioned are possible. The code works 99% of the time with no Load errors. Nothing is different between the failures trust me, I've checked everything I can think of to try and find a defining reason.
  • Paul Williams
    Paul Williams over 14 years
    Oops. Now I read your comment about having solved the issue with a printer driver upgrade. Oh well!
  • Guilherme
    Guilherme over 14 years
    Hi, thanks for your response, I'm trying what you suggested now. I was wrong it had nothing to do with the Printer. I've marked my response for deletion. I am using VS2008 though, however I think what you've suggest still applies.