On Apr 12, 2:31=A0pm, Kevin Butler <kbut...@[EMAIL PROTECTED]
> wrote:
> On Apr 9, 12:08=A0am, "Martin" <nos...@[EMAIL PROTECTED]
> wrote:
>
>
>
>
>
> > Hello
>
> > We are currently managing to do multiple p***** through a do***ent to
ge=
t
> > from different trays so that one invoice for example can have two
copies=
but
> > would always be all pages of one invoice then all pages again
>
> > so we would get
>
> > I1 P1 C1
> > I1 P2 C1
> > I1 P3 C1
> > I1 P1 C2
> > I1 P2 C2
> > I1 P3 C2
> > I2 P1 C1
> > I2 P2 C1
> > I2 P1 C2
> > I2 P2 C2
>
> > Or we can tell the printer to do multiple pages and get
>
> > I1 P1 C1
> > I1 P1 C2
> > I1 P2 C1
> > I1 P2 C2
> > I1 P3 C1
> > I1 P3 C2
>
> > But I would like to be able to do the oRe****t:Printdevice:Copies :=3D
2 =
with
> > two different trays.
>
> > Any ideas if this is possible?
>
> > Thanks
>
> // Open re****t
> FOR t=3D1 TO nCopies
> oRe****t:PrintRe****t()
> NEXT t
> // Close re****t- Hide quoted text -
>
> - Show quoted text -
Sorry - a bit quick on the Post button. Here is the detail I meant to
send.
We call a method which prepares the re****t, selectes the various
options, opens it, prints it x times, closes and returns.
E.g. we call it repeatedly within the job sending the copy count and
the printer info for each.
The function itself locates the printer and tray and RPro forms by
calling from within itself. But we could pass them of course
If we wanted 1 copy on 1 tray and another on another tray we would
call the function for each Printer/tray combination
Calling Method Abstract:
......
// Start
self:InvPrint( Invoice, Copies, Tray etc) - includes re****t file,
copies etc) and function identifies the printer an tray from INI file
settings
self:InvPrint( PackingSlip, Copies, Tray etc)
// End
RETU xxx
=2E......
METHOD InvPrint ( nInvNum, lPreview, nCopies, lIsInvoice, lPrnDev,
lPricedPS, cMailFIle, lIsFax ) CLASS Re****tsWin
// lPrnDev means choose a printer else we locate our default printer
for invoices or packing slips or delivery notes etc
// Otherwise get the printer and tray names from an INI file
IF lPrnDev
oPrnDev:=3DPrintingdevice{}
IF ! oPrnDev:setup()
RETU NIL
ENDI
cPrinter:=3DoPrnDev:device
ENDI
IF cPrinter =3D "<Default>"
cPrinter:=3D""
ENDI
// aGlobalStuff[3] =3D Ini file
cPrinter:=3D GetIniInfo( aGlobalStuff[3],"Printers","Invoice","" ) //
If Invoice being printed
cTray :=3D
GetIniInfo( aGlobalStuff[3],"Printers","InvoiceTray","<Default>" ) //
Tray for invoice printer
cInv:=3D
GetIniInfo( aGlobalStuff[3],"Options","InvoiceFormat","LANDSCAPE" ) //
layout etc
aRe****ts :=3D CustomInvoiceForms () // {Invoice, Priced PS,
Unpriced PS } // The Re****tPro file name
oRe****t:LoadRe****t(aRe****ts[1]) // we have different layout options
under the program settings.
IF oRe****t:IsValid
IF ! Empty(cPrinter) // else default
oRe****t:SetRe****tStringAttribute(RPT_ATTR_PRINTER_NAME,cPrinter)
ENDI
oRe****t:SetSectionIntAttribute( 1, SECTION_ATTR_PAPER_BIN,
PrinterTrayNumber(cTray) ) // DMBIN_UPPER
FOR t=3D1 TO nInvoices
oRe****t:PrintRe****t()
NEXT t
oRe****t:Close()
oRe****t:Destroy()
oRe****t :=3D NULL_OBJECT
Sleep(200) // give the GC time
KillTempFile(cTEmpFile) // we create a temp uniquely named DBF for
each print job, then kill it after use
ResetWorkDirectory () // because if the user previews he can save to
another folder and this confuses RPro
FUNC PrinterTrayNumber (cTray)
// We get this from our ini file settings where we set the invoice, P/
Slip and delivery note printers. The user selects cTray when setting
up.
// this is to convert to the numeric value that the printer needs.
LOCA nRet AS INT
cTray :=3D Upper(cTray)
DO CASE
CASE "UPPER" $ cTray
nRet :=3D 1
CASE "DEFAULT" $ cTray
nRet :=3D 1
CASE "LOWER" $ cTray
nRet :=3D 2
CASE "MIDDLE" $ cTray
nRet :=3D 3
CASE "SINGLE" $ cTray
nRet :=3D 1
CASE "AUTO" $ cTray
nRet :=3D 7
OTHE
nRet :=3D Val(cTray) // In case we ever want to extend it!
ENDC
RETU nRet
/*
Here are the VO constants :
DEFINE DMBIN_FIRST :=3D DMBIN_UPPER
DEFINE DMBIN_UPPER :=3D 1
DEFINE DMBIN_ONLYONE :=3D 1
DEFINE DMBIN_LOWER :=3D 2
DEFINE DMBIN_MIDDLE :=3D 3
DEFINE DMBIN_MANUAL :=3D 4
DEFINE DMBIN_ENVELOPE :=3D 5
DEFINE DMBIN_ENVMANUAL :=3D 6
DEFINE DMBIN_AUTO :=3D 7
DEFINE DMBIN_TRACTOR :=3D 8
DEFINE DMBIN_SMALLFMT :=3D 9
*/


|