Changing Paper Source inside a report
Hi,
I have a user printing a letter. They would like the first page of the
letter to come from one paper bin (with letterhead paper) and the
second to come from another. There is a letter printed to each
of their customers.
Is there a way inside a detail band to change the bin? Could I do
it with rap or do I need a passthough?. Where would it go? I
know I can put in a sub-report and start that on a new page.
Thanks,
Joseph Gordon
I have a user printing a letter. They would like the first page of the
letter to come from one paper bin (with letterhead paper) and the
second to come from another. There is a letter printed to each
of their customers.
Is there a way inside a detail band to change the bin? Could I do
it with rap or do I need a passthough?. Where would it go? I
know I can put in a sub-report and start that on a new page.
Thanks,
Joseph Gordon
This discussion has been closed.
Comments
See article below for how to do this with Delphi code. To use RAP code you
will need to implement a pass through functinon and call it from the
Report.OnStartPage event in RAP.
--------------------------------------------
Tech Tip: Selecting Paper Bins for Each Page
--------------------------------------------
Sometimes you may want to print the first page of a report to the
manual bin and then print the remaining pages to the default bin.
You can use the Report.OnStartPage event to set the bin for any page.
Example:
procedure TForm1.ppReport1OnStartPageEvent(Sender:TObject);
var
lsBinName: String;
begin
if ppReport1.AbsolutePageNo = 1 then
lsBinName := ppReport1.PrinterSetup.BinNames[3]
else
lsBinName := ppReport1.PrinterSetup.BinNames[1];
ppReport1.Engine.Page.PrinterSetup.BinName := lsBinName;
end;
Note: The above example assumes the manual bin is 4th in the list (remember
its a 0 based index). To account for different print drivers, you could
search for the 'manual' bin in code by performing a search on the printer's
available bin names:
for liBin := 0 to ppReport1.PrinterSetup.BinNames.Count-1 do
if Pos('manual', ppReport1.PrinterSetup.BinNames[liBin]) > 0 then
begin
lsBinName := ppReport1.PrinterSetup.BinNames[liBin];
break;
end;
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
--
Nard Moseley
Digital Metaphors
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com