If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Corel Paradox > tray selection from Paradox 10 to HP4300

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-23-04, 03:48
Xerma Xerma is offline
Registered User
 
Join Date: Jun 2004
Posts: 2
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.

Xerma.



Code:
method pushButton(var eventInfo Event)
var
  strReportName    String ;// tmp handle to report name
  rHandle              Report ;// tmp handle to report being opened
  m                     menu
  repInfo              dynArray[] Anytype; in plaats van ReportPrintInfo
endVar
  if FileName.Value = "" then 
    msgInfo("No report is selected.","No report is selected.")
  else
    ; 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.")
    else
      libSIS.cmSetRptFileNameOfReport(FileName.Value)
      libSIS.cmSetRptNameOfReport(ReportName.Value)
      ; 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'
      rHandle.print(repInfo)
    endif
  endif
  formReturn(FALSE)
endMethod
Reply With Quote
  #2 (permalink)  
Old 06-23-04, 12:39
Shores Shores is offline
Registered User
 
Join Date: Aug 2003
Location: Bologna - Italy
Posts: 209
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.
Reply With Quote
  #3 (permalink)  
Old 07-02-04, 03:41
Xerma Xerma is offline
Registered User
 
Join Date: Jun 2004
Posts: 2
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.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On