on 2023 Sep 21 5:43 PM
Using Crystal XI SP2, we have many reports and are doing a migration. We're finding that in some cases of running the report, there is a huge delay. The "This report uses an invalid printer. The default printer will be used instead." What seems to be happening is that a printer had been defined and could not be found. I know we can go into each report and set "No Printer". However, with hundreds of reports, it would be preferable to be able to handle correcting the issue, at runtime, through our report generation code. Can anyone suggest how to do this?
We tried the setPrinter option = "No Printer" and it seems to not work.
Thank you,
- Nick
Hi Nick,
That was an old bug, the Engine would search the network for the original report so CR added Dissociate option in the Page Setup to stop it from looking, it would look for any printer the closely matches the design printer saved in the RPT file.
Unfortunately CR XI R2 is no longer available, I believe it was fixed in a later patch.
If you look at this printer test app you will notice code to test if not printer is used, to be able to change the printer you use a dummy report with the printer info defined for that use/report.
Printing Crystal Reports in .NET
I never suggested using No printer, CR has dependencies on the hardware and the printer so always use a real printer.
So first thing to do is upgrade to the latest CR for VS runtime here:
https://wiki.scn.sap.com/wiki/display/BOBJ/Crystal+Reports%2C+Developer+for+Visual+Studio+Downloads
Note: CR runtime is no longer included with Crystal Reports install, this is the one to use now for all versions of Visual Studio - 2010->2022.
And this blog on upgrading:
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Don. I'll mark your response as accepted and appreciate it very much. I have a number of thoughts/questions.
First, it was not clear to me what the purpose of the application in the Printing Crystal Reports in .NET was doing. Our implementation involved the creation of classes which handled the loading of reports and subreports. The number of reports in the hundreds. We were able to locate the service packs and update the installation. However, an example of reassigning a printer at runtime would still be quite useful.
I'm not sure that I understand why a dummy report needed to be used to establish Print Options other than perhaps the thinking is that a report configured through the GUI would have all the necessary settings, as opposed to setting them one by one at runtime and needing to store them in configuration somewhere.
Thanks!
- Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
72 | |
10 | |
10 | |
7 | |
7 | |
7 | |
7 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.