How to change PaperSource "First page" in code

I am using XE6 C++ with FastReports 4.15.10

I am putting together a general option for my users to enable them to change the Paper Source (feed location) of the selected printer from default or Tray1 to MP Tray. I know that you can change this in the designer by going to the File->Page Settings. But how do I change that inside my code prior to printing.

The reason behind this is most of the reports are going to be default or tray 1, but I have some reports that are for printing sheets of labels, and they will be/ or could be single sheet feed by the user. So in my configuration area, I want to be able to allow the user to pre-define where the labels are going to be feed from.

I have tried, prior to frxReport->PrepareReport(true), in going in to the frxReport->PrintOptions->Printer = default. And changing this to MP Tray, but the printer still feeds from Tray1. If I set the Firstpage and Otherpage to MF Tray, and do a preview, the printer feeds from the location needed.

And yes I know, if I have the PrintOptions->ShowDialog checked, one can go in to the printer settings and then change the paper source, but I am working on the KISS for the users, as not all of them are going to be computer savvy


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.