cancel
Showing results for 
Search instead for 
Did you mean: 

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

enricozaninelli
Explorer
0 Kudos

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:

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

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Open each report and go to page setup, check on the Dissociate option, that removes the specific printer saved in the RPT file.

CR should look for the closest match for the local printer, does require a printer to be installed.

Another option is to click on the Print Button and set the printer there, save the report, CR will look for that printer now.

Answers (0)