ESR - PVR Coupon (Swiss Module) Printer tray PAPERSOURCE

andy76andy76 Member Posts: 616
Hello,

I would like to know if there is a technical document that explained how to set Navision for printing the invoice on a specified tray and the preprinted ESR/PVR bullettin/coupon taking the sheet from another tray.

I think that this is a general problem for Swiss customer.

I only see the properties PaperSource / PaperSourceFirstPage / PaperSourceOtherPages in CSIDE but I don’t know if they work really good or there are other method that test and personalize completely the report standard.

Comments

  • mart1n0mart1n0 Member Posts: 123
    Hi andy76,

    I have struggled with the same problem.
    We just set up a printer for each tray. You can add the same printer 3 times and give it different names and settings without any problem in windows.

    We added it with different names like this:
    HP-WHS-TRAY1 (Set up to print default to TRAY1)
    HP-WHS-TRAY2 (Set up to print default to TRAY2)
    etc.
  • tinoruijstinoruijs Member Posts: 1,226
    andy76 wrote:
    I only see the properties PaperSource / PaperSourceFirstPage / PaperSourceOtherPages in CSIDE but I don’t know if they work really good or there are other method that test and personalize completely the report standard.

    They can work ok. But you have to make sure the right drivers are installed for the printer. And make sure the trays are defined/added within the printer.

    If you want to know the number of the printertray, you can record a macro in Word when you test the trays. Take a look at the vba-code that is recorded and use the number in the properties PaperSourceFirstPage / PaperSourceOtherPages.

    Tino Ruijs
    Microsoft Dynamics NAV specialist
  • andy76andy76 Member Posts: 616
    Hello,

    thank you very much for your advice.

    I tried to register a Word Macro before with tray 3 (lower) - the one for PVR/ESR bullettin and this is the code:


    ActivePrinter = "\\servername\printername"
    Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
    wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
    ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
    False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
    PrintZoomPaperHeight:=0



    and then for bin/tray 2 (the one for white paper)

    Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
    wdPrintDocumentContent, Copies:=1, Pages:="", PageType:=wdPrintAllPages, _
    ManualDuplexPrint:=False, Collate:=True, Background:=True, PrintToFile:= _
    False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
    PrintZoomPaperHeight:=0

    There is not any difference and no parameter for bin/tray.


    This is the model of the printer:

    HP Color LaserJet 2605dn_2605dtn PCL 6

    Do you have others suggestions?

    Thank you very much

    Andy
  • alsolalsol Member Posts: 243
    Hello Andy,

    This thread is already older but someone might be interested how this macro works.

    To get the tray number, you need to record a macro and then change the page setup of your document (File -> Page Setup). Then change the trays on the first tab. This way it works, you probably tried it using the printer driver setup. So you should get something like this:
    Sub Makro3()
        With ActiveDocument.Styles(wdStyleNormal).Font
            If .NameFarEast = .NameAscii Then
                .NameAscii = ""
            End If
            .NameFarEast = ""
        End With
        With ActiveDocument.PageSetup
            .LineNumbering.Active = False
            .Orientation = wdOrientPortrait
            .TopMargin = CentimetersToPoints(2.5)
            .BottomMargin = CentimetersToPoints(2)
            .LeftMargin = CentimetersToPoints(2.5)
            .RightMargin = CentimetersToPoints(2.5)
            .Gutter = CentimetersToPoints(0)
            .HeaderDistance = CentimetersToPoints(1.25)
            .FooterDistance = CentimetersToPoints(1.25)
            .PageWidth = CentimetersToPoints(21)
            .PageHeight = CentimetersToPoints(29.7)
            .FirstPageTray = 262
            .OtherPagesTray = 261
            .SectionStart = wdSectionNewPage
            .OddAndEvenPagesHeaderFooter = False
            .DifferentFirstPageHeaderFooter = False
            .VerticalAlignment = wdAlignVerticalTop
            .SuppressEndnotes = False
            .MirrorMargins = False
            .TwoPagesOnOne = False
            .BookFoldPrinting = False
            .BookFoldRevPrinting = False
            .BookFoldPrintingSheets = 1
            .GutterPos = wdGutterPosLeft
        End With
    End Sub
    

    Best regards,
    Felix
  • barcombarcom Member Posts: 8
    Hallo Andy

    Try directly communicate via PCL command to tell which tray the report will be printed. We use Kyocera Laser printers and below you see our command for Manual Tray. I put this on top of my Report Section.


    !R! CASS 1; EXIT;

    I hope it solves your problem, or at least gives you a hint.

    Regards
    Baris
Sign In or Register to comment.