Note that there are some explanatory texts on larger screens.

plurals
  1. POCrystal Reports loads very slowly if printer is invalid
    primarykey
    data
    text
    <p>In Crystal Reports, if another developer designed a report, I see the error "This report uses an invalid printer. The default printer will be used instead." </p> <p>I noticed that it takes a VERY long time to open reports programatically when they have this error message. One report took up to 1 1/2 minutes to load with an invalid printer, and then only 5 seconds to load when I fixed the printer. The problem is, we can fix the reports within our network printers, but we deploy our software to customers who will not have our printer setup. They likely have these load times for ALL reports. <br><br></p> <p><b>How do I set the printer programatically to the default printer, to speed the report loading up?</b> </p> <p>The code below didn't work; at least, it still took 1 1/2 minutes to load, whether I am able to print from that printer name or not. I am using a ReportDocument (CrystalDecisions.CrystalReports.Engine.ReportDocument) object to print. Here is a snippet of the code, along with where I am trying to set a new printer.</p> <p><br></p> <pre> // Create CrystalDecisions.CrystalReports.Engine.ReportDocument object ReportDocument crReportDocument = new ReportDocument(); // Typically this is set to .PortableDocFormat ExportFormatType selectedOutputType = m_ExportFormat; System.Drawing.Printing.PrinterSettings printerSettings = new System.Drawing.Printing.PrinterSettings(); crReportDocument.PrintOptions.PrinterName = printerSettings.PrinterName; // Load() takes an EXTREMELY long time // if the RPT file is saved with a printer not found on this computer. crReportDocument.Load(m_FileName); </pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload