Changing paper tray in RAP
W2K, RB 7.03 Ent / Brother HL-4200CN printer...
Hi,
I am struggling to get custom paper sizes printing correctly without manual
user intervention.
I have a report where the main report contains nothing apart from 4
sub-reports, three of each of which need to print on different CUSTOM paper
sizes (the 4th on A4). The Brother printer driver requires us to configure
the Custom paper sizes within the printer driver, which we have done.
In each of the sub-reports I have set the appropriate Paper Size (Custom 1,
2 or 3) and Paper Source (MP Tray) in the Page Setup.
All display correctly (e.g. the correct paper size) when previewing on
screen.
However, when I try and physically print, if I click on the Properties tab
on the PrinterDialog screen, the settings have reverted to a paper size of
'A4' and a paper source of 'Auto (exclude manual)'.
I have tried setting the correct paper source in RAP on the
Report.OnStartPage event (as per your Tech Tip) but
1. the Report.Engine.Page.PrinterSetup.BinName property is not exposed in
RAP, although I can set Report.PrinterSetup.BinName.
2. Setting Report.PrinterSetup.BinName does not work as it still reverts to
'Auto (exclude manual)'.
The subreports are all set to type Section, with NewPrintJob and
ParentPrinterSetup both set to False.
What am I doing wrong? How can I get it working the way I want?
We have a couple of other templates too in which we need to be able to
change paper source e.g. on a 2 page per client mailshot, where our client
requires page 1 from bin 1 and page 2 from bin 2. We cannot seem to find any
combination that works! All these reports are created from Report Explorer
so we have to be able to do this in RAP and not from our Delphi application.
Any help would be much appreciated!
Regards,
Pete Colson
c
Hi,
I am struggling to get custom paper sizes printing correctly without manual
user intervention.
I have a report where the main report contains nothing apart from 4
sub-reports, three of each of which need to print on different CUSTOM paper
sizes (the 4th on A4). The Brother printer driver requires us to configure
the Custom paper sizes within the printer driver, which we have done.
In each of the sub-reports I have set the appropriate Paper Size (Custom 1,
2 or 3) and Paper Source (MP Tray) in the Page Setup.
All display correctly (e.g. the correct paper size) when previewing on
screen.
However, when I try and physically print, if I click on the Properties tab
on the PrinterDialog screen, the settings have reverted to a paper size of
'A4' and a paper source of 'Auto (exclude manual)'.
I have tried setting the correct paper source in RAP on the
Report.OnStartPage event (as per your Tech Tip) but
1. the Report.Engine.Page.PrinterSetup.BinName property is not exposed in
RAP, although I can set Report.PrinterSetup.BinName.
2. Setting Report.PrinterSetup.BinName does not work as it still reverts to
'Auto (exclude manual)'.
The subreports are all set to type Section, with NewPrintJob and
ParentPrinterSetup both set to False.
What am I doing wrong? How can I get it working the way I want?
We have a couple of other templates too in which we need to be able to
change paper source e.g. on a 2 page per client mailshot, where our client
requires page 1 from bin 1 and page 2 from bin 2. We cannot seem to find any
combination that works! All these reports are created from Report Explorer
so we have to be able to do this in RAP and not from our Delphi application.
Any help would be much appreciated!
Regards,
Pete Colson
c
This discussion has been closed.
Comments
1. As a simple base line test configure a set of simple one page reports to
print with each of the required settings and test to determine whether that
works. (Perhaps you have already done this).
2. Once you get number 1 working, then conifguring each section subreport
should work. The NewPrintJob setting should not be required. Each section
subreport can print with a different paper bin and paper size.
3. To set Report.Engine.Page.PrinterSetup via RAP code will require that you
create a custom function and register it with the RAP Code Toolbox. See the
article below.
--------------------------------------------------
Article: Extending RAP
---------------------------------------------------
There are two very simple and powerful techniques to extend the capabilities
of RAP infinitely. These are summarized below and covered in more detail in
the RAP.hlp online help. Demos and tutorials are installed to
RBuilder\Demos\RAP. The tutorial text is located in RAP.hlp.
1. RAP Pass-Through Functions
These are functions that appear in the Language tab of RAP's Code Toolbox.
These functions are written in Delphi and can be called from RAP. RAP's
pass-through function architecture enable's developers to add new built-in
functions to RAP's code toolbox.
2. Extend RAP's RTTI
RAP's Run-time Type information defines what classes and properties can be
accessed via RAP. By default the published properties of any class that is
registered with Delphi's RegisterClass procedure is recognized by RAP. In
addition many of the public properties and methods of ReportBuilder classes
are exposed.
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com