Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Report: First Page on different paper

3 views
Skip to first unread message

John King

unread,
Jan 20, 1998, 3:00:00 AM1/20/98
to

My report is an itemised bill for each of a number of customers. Sometimes
the number of items is such that I need a second or third page, sometimes
not. However I want my first page of each bill on headed paper (from the
upper tray) and subsequent pages if any on plain paper (from the lower
tray).

Any ideas?

Darryl Johnson

unread,
Jan 21, 1998, 3:00:00 AM1/21/98
to

John King wrote:

I think your best bet is to treat the report as _two_ reports, both fired from
the one command button (or menu item).

Report #1 will print [Page 1] of the report using one set of saved printer
parameters: printer X, input bin upper, etc.
Report #2 will print [Pages 2 - 999] of the report using another set of saved
printer parameters: printer X, input bin lower, etc.

HTH,
--
Darryl Johnson Darryl....@nlc-bnc.ca
National Library of Canada
Anti spam note: Do not Reply without correcting the address
** None of the above has any official status **

Allen Browne

unread,
Jan 22, 1998, 3:00:00 AM1/22/98
to John King

John King wrote:
> My report is an itemised bill for each of a number of customers. Sometimes
> the number of items is such that I need a second or third page, sometimes
> not. However I want my first page of each bill on headed paper (from the
> upper tray) and subsequent pages if any on plain paper (from the lower
> tray).

The following solution is from Microsoft's NEATCODE.EXE,
an MS Access database of useful VBA code. This assumes
you are using Access 95 or 97.

---------------------------------------------------------------
Function TwoTrayPrinting(ReportName As String) As Integer
'
' Prints a report's page 1 from the upper tray
' and the remaining pages from the lower tray.
' NOTE: The report gets run twice, once for each tray.
'
' Assumes: that the report has 999 or fewer pages.
'
' Returns: TRUE = Success; FALSE = Error
'
Const MAX_PAGES = 999

' Open the report in DESIGN view
On Error GoTo TTP_Error
DoCmd.Echo False
DoCmd.OpenReport ReportName, A_DESIGN

' Switch to upper tray and print first page
SetReportTray Reports(ReportName), R_UPPER_TRAY
DoCmd.PrintOut A_PAGES, 1, 1

' Switch to lower tray and print remaining pages
SetReportTray Reports(ReportName), R_LOWER_TRAY
DoCmd.PrintOut A_PAGES, 2, MAX_PAGES

' Close the report
DoCmd.SetWarnings False
DoCmd.Close A_REPORT, ReportName
DoCmd.SetWarnings True
DoCmd.Echo True
TwoTrayPrinting = True

TTP_Exit:
Exit Function

TTP_Error:
TwoTrayPrinting = False
DoCmd.Echo False ' Restore screen echo
Resume TTP_Exit

End Function
---------------------------------------------------------------
,~,_/\
/ \ Allen Browne
{ Perth } Australia
*_,~~\_/ http://odyssey.apana.org.au/~abrowne/
v

Byron Downey

unread,
Jan 24, 1998, 3:00:00 AM1/24/98
to

Dear Mr. King,

One way is to embed the specific printer command code within the reports
group header, this "solution" violates the independence provided through
the hardware abstraction layer, and should be avoided unless you want to
create a legacy issue when a new printer is installed. Further, many
environments have differing printers, yadda, yadda ( ie don't do this ).

A better way would be to digitize your letter head ( and footer if any )
into the group header level break and print it all on plain paper.

This does shift load unto the printer somewhat, but what the hey, color
printers are a dime a dozen these days.

Cowboy Byron asks "Can there be TWO people named John King"?
=========================================
| Downey Enterprises (414) 654-3555
| Opening Information for your Organization
| P.O. Box 264, Kenosha, WI 53141-0264
| http:\\www2.wi.net/~byrond byr...@wi.net
=========================================

John King <jk...@iol.ie> wrote in article <6a37ml$fe$1...@nuacht.iol.ie>...


> My report is an itemised bill for each of a number of customers.
Sometimes
> the number of items is such that I need a second or third page, sometimes
> not. However I want my first page of each bill on headed paper (from the
> upper tray) and subsequent pages if any on plain paper (from the lower
> tray).
>

> Any ideas?
>
>
>

0 new messages