Setting Printer Tray Through Code
I am looking to set the printer tray/bin programmaticly, but it seems that the report's paper size overrides every attempt. IE. if the report's paper size is legal and I specify a bin with non-legal size paper, it will print to the legal bin. My code is as follows:
TfrxReportPage(Report.FindObject('Page1')).Bin := fBin;
TfrxReportPage(Report.FindObject('Page1')).BinOtherPages := fBin;
Report.PrepareReport(False);
Report.Print;
The report and project in question was upgraded from FR3 in which this was never a problem. I have a method in place now to resize the report as necessary, but preferably I would rather leave it up to the printer bin. Is there a way to force it to use the given bin, regardless of what size the report is?
TfrxReportPage(Report.FindObject('Page1')).Bin := fBin;
TfrxReportPage(Report.FindObject('Page1')).BinOtherPages := fBin;
Report.PrepareReport(False);
Report.Print;
The report and project in question was upgraded from FR3 in which this was never a problem. I have a method in place now to resize the report as necessary, but preferably I would rather leave it up to the printer bin. Is there a way to force it to use the given bin, regardless of what size the report is?
Comments
For reliable operation it seems to be imperative that FR paper size and Bin paper size match.
Yes, this code performed as desired in FR3. What I've posted above is an exact copy from the FR3 project.