How to address a printer's paper tray from Navision

alsol
Member Posts: 243
Hello
We have some problems with Navision and printers. Acutally we have to add a printer twice, one time per paper tray we want to print in. This is very hard work with many printers and sometimes 2 or 3 paper trays. Are there any other possibilities to address a paper tray directly out of Navision? Are there any tools to do that?
Regards
cyberscout
We have some problems with Navision and printers. Acutally we have to add a printer twice, one time per paper tray we want to print in. This is very hard work with many printers and sometimes 2 or 3 paper trays. Are there any other possibilities to address a paper tray directly out of Navision? Are there any tools to do that?
Regards
cyberscout
0
Comments
-
First of all you need the correct sand the same version system driver on all of your PCs.
Then get the software "FindTrays" in order to get the correct ID of the tray. Then enter this information in the Report Properties "PageSourceFirstPage" or "PageSourceOtherPages"
There was also a bug in Navision. The Properties "PageSourceFirstPage" or "PageeSourceOtherPages were ignored when the Report was started with "UseRequestForm" = False. HF 30 for 3.60 and HF 12 for 3.70 fixes that poblem.
Hope I could help you. Search the forum for other solutions.
medost0 -
Well, the thread is older, but the main question is still not answered:
Where to find FindTrays?Leo S. E. Lang
Freudenberg Schwab GmbH
16761 Hennigsdorf
Germany0 -
Hi
Better late than never!
This problem cost me hours, so I hope this will help some people who are having the same:
I also haven't found an application called "FindTrays", but I found an VB-script wich gives you the binary number of all trays back.
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q194789&
Create an Visual Studio 6 Form Project, place a Button and a Textbox with Multiline on. After that place that code:Option Explicit Private Declare Function DeviceCapabilities Lib "winspool.drv" _ Alias "DeviceCapabilitiesA" (ByVal lpDeviceName As String, _ ByVal lpPort As String, ByVal iIndex As Long, lpOutput As Any, _ ByVal dev As Long) As Long Private Const DC_BINS = 6 Private Const DC_BINNAMES = 12 Private Sub Command1_Click() Dim prn As Printer Dim dwbins As Long Dim ct As Long Dim nameslist As String Dim nextString As String Dim numBin() As Integer Text1.Font.Name = "Courier New" Text1.Font.Size = 12 Text1.Text = "" For Each prn In Printers dwbins = DeviceCapabilities(prn.DeviceName, prn.Port, _ DC_BINS, ByVal vbNullString, 0) ReDim numBin(1 To dwbins) nameslist = String(24 * dwbins, 0) dwbins = DeviceCapabilities(prn.DeviceName, prn.Port, _ DC_BINS, numBin(1), 0) dwbins = DeviceCapabilities(prn.DeviceName, prn.Port, _ DC_BINNAMES, ByVal nameslist, 0) If Text1.Text <> "" Then Text1.Text = Text1.Text & vbCrLf & vbCrLf End If Text1.Text = Text1.Text & prn.DeviceName For ct = 1 To dwbins nextString = Mid(nameslist, 24 * (ct - 1) + 1, 24) nextString = Left(nextString, InStr(1, nextString, _ Chr(0)) - 1) nextString = String(6 - Len(CStr(numBin(ct))), " ") & _ numBin(ct) & " " & nextString Text1.Text = Text1.Text & vbCrLf & nextString Next ct Next prn End Sub Private Sub Form_Load() ' Size and position the Form and controls Me.Height = 7000 Me.Width = 7000 Text1.Top = 100 Text1.Left = 100 Text1.Height = 6450 Text1.Width = 5000 Text1.Text = "" ' Clear the TextBox Command1.Left = 5300 Command1.Top = 1000 Command1.Width = 1500 Command1.Caption = "List Bins" End Sub
After clicking on "List Bins" you'll see a list of all your installed printers with their trays and bin-numbers.
Example:\\server\HP4000PCL
15 Automatically Select
262 Auto Select
261 Tray 1
260 Tray 2
259 Tray 3
258 Tray 4
257 Manual Feed (Tray 1)
5 Envelope Feeder
Place this code at the beginning of your report:CurrReport.PAPERSOURCE := PaperSource;
PaperSource is an Integer wich is in the request form.
For Tray 2 in this case, just enter 260 as PaperSource.
If you want to give the customers the ability to do that, you could write an COM-Api and generate an own Listbox with the right trays!
But that's another story
Have Fun!
Greetings
Lorry0 -
0
-
-
0
-
-
Kowa wrote:Or you can try out this one :
http://www.oraxcel.com/projects/printertrays/Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0 -
Timo Lässer wrote:Kowa wrote:Or you can try out this one :
http://www.oraxcel.com/projects/printertrays/Kai Kowalewski0 -
Kowa wrote:[...]
I haven't used FindTrays, PrinterTrays is the only one I know.
(I didn't know the source where I've got it. It's to long ago.)Timo Lässer
Microsoft Dynamics NAV Developer since 1997
MSDynamics.de - German Microsoft Dynamics Community - member of [clip]0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions