Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2004

    Unanswered: tray selection from Paradox 10 to HP4300

    Dear all:

    This piece of code allowed me to nicely select printer trays using radio buttons. This worked fine for HP laserjet 5, but our HP4300 laserjets do not react on this, so windows defaults are used.

    I have got 3 questions:
    1. Does anyone have any hints on how to solve this for HP4300?
    2. I figured out the strings which worked for laserjet 5 to put into repInfo("Papersource"), namely 'Tray 1', 'Tray 2' or 'Tray 3'. Does anyone know how paradox converts this to HP printer language. Were could I find documentation on what strings to use?
    3. Is it maybe possible to sent escape sequences from Paradox straight to the printer to solve this tray selection problem?

    Thanks very much for your help.


    method pushButton(var eventInfo Event)
      strReportName    String ;// tmp handle to report name
      rHandle              Report ;// tmp handle to report being opened
      m                     menu
      repInfo              dynArray[] Anytype; in plaats van ReportPrintInfo
      if FileName.Value = "" then 
        msgInfo("No report is selected.","No report is selected.")
        ; Assign report file name
        strReportName = ":sisCommonFiles:" + FileName.Value
        if not isFile(strReportName) then
          ; check if file exists
          msgInfo("Sorry, no such file found.","Sorry, no such file found.")
          ; first, set up the repInfo record with settings for printing
          repInfo["nCopies"] = 1
          repInfo["paperSize"] = prnA4
          repInfo["name"] = strReportName
          repInfo["orient"] =  libsis.cmGetOrientation()
          repInfo["paperSource"] = libsis.cmGetTray()  ;// this can be either 'tray 1' or 'tray 2' or 'tray 3'

  2. #2
    Join Date
    Aug 2003
    Bologna - Italy
    Quick answers:

    1) Have you got SP3? It solves TONS of print related bugs, i think also about tray selection.

    2) libSIS.cmSetRptFileNameOfReport, libSIS.cmSetRptNameOfReport, libsis.cmGetTray() are call to functions in libraries of yours, you should also post these functions, especially libsis.cmGetTray(), if you want us to debug them!

    3) Have you tried using ReportPrintInfo structure instead of DynArray form of report.print()?

    Longer Answer:

    No, you can't send escape codes to the printer via standard ObjectPal. Surely you can call Win32 API from within OPAL to set the default printer or default tray to what you want, print with pdox then return all to previous settings; Consider Pdox works, as all windows apps, at a totally device independent level, so no escape codes could be sent to the printer.
    The only failure is not trying to do it.

  3. #3
    Join Date
    Jun 2004
    Dear Shores:

    Thank you for your response. I have been ill a few days that is why I react a little late.

    1) I installed SP3 but to no avail...

    2) You are right: I should have sent you the function libsis.cmGetTray(), but debug I have used the strings "Tray 1", "Tray 2" or "Tray 3" instead of the function call to my library and did not have any luck. The function does the same thing.

    3) The ReportPrintInfo structure does not allow for tray selection as far as I know.

    If you have got any experience with using Win32 api from ObjectPal then could you give me some hints. I am desparate.....

    Thanks a lot, Xerma.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts