Skip to Content
0
4 days ago

Java - Crystal Reports 2020 - How to change the default printer saved in .rpt file

51 Views Last edit 3 days ago 2 rev

Hi,

It seems that in an .rpt file there is a printer set up as default printer. This setting seems to be saved in the file itself.

The only way I've found to set that setting is to change the printer and then use the "Apply" button in the "Printer setting" window, when I'm about to print the report, as described here:

image.png

The questions are:

- Is there another way to edit the setting in the CR 2020 designer?

- (most important) How can I change the default printer at runtime, using the Java SDK on the object ReportClientDocument?

This is a problem for me, because of two reasons:

1 - The .rpt file could have been created on another machine, so it might have set as default a printer that is not present on the machine on which the file is being used at runtime by the Java program that makes prints.

This causes an issue because the program will search for the default printer on the OS, without founding it, thus creating performance problems.

2 - The default printer features might overrule the printer features set at runtime.

Any help will be appreciated.

Thanks,

Enrico

Attachments

image.png (87.6 kB)