Selecting from multiple printers at runtime

Hi,

I'm working on an application that needs to manage multiple printers, the one to use should be selected at runtime.
How can I do the runtime selection of the desired printer?

Until now, I have been trying to do it as follow, but it invariably selects the Windows default printer, and not the one that I selected on runtime.

Code ...
String ImpresoraSeleccionada = "A"; // This line of code is not real, but it is for selecting the desired printer
frxR_TicketProduccionSIAP->PrintOptions->Printer = ImpresoraSeleccionada;
frxR_TicketProduccionSIAP->PrepareReport(true);
frxR_TicketProduccionSIAP->Print();
Code ...

What am I doing wrong?
Any help would be appreciated.

I'm using C++ Builder Berlin Enterprise.

Best regards,
Patricio Cerda

Comments

  • gpigpi
    edited 2:09PM
    wrote:
    String ImpresoraSeleccionada = "A"; // This line of code is not real, but it is for selecting the desired printer
    Check printer's name, it may be a typo in the printer's name

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.