Ocx directprint

ab
Member Posts: 37
I've installed the dll without any problem, made a report in navision that creates an ascii-file
with the necessary escape-codes and now I want to print my label with the next command
pathtxtFile := 'c:\textNav.txt';
PrinterName := '\\FIPRI\PR36--BP1344';
NaviPrinter.DirectPrint(PrinterName, pathtxtFile);
But this doesn't work, what am i doing wrong ?
Thx,
alexander
with the necessary escape-codes and now I want to print my label with the next command
pathtxtFile := 'c:\textNav.txt';
PrinterName := '\\FIPRI\PR36--BP1344';
NaviPrinter.DirectPrint(PrinterName, pathtxtFile);
But this doesn't work, what am i doing wrong ?
Thx,
alexander
0
Comments
-
Is the name of the printer in the "printer" table when you are calling this code? If no, the name is wrong. You need to use the name which is in the virtual table "Printer".0
-
I've checked and it is the right printername from the virtual printertable!0
-
Ah, I see the problem - the procedure is not reading the text file and printing it. It is printing directly the string you are passing as parameter. You need to read the file in the code and print the lines through the function...0
-
This is my code and it still doesn't work
PrinterName := '\\FIPRI\PR36--BP1344';
CREATE(NaviPrinter);
pathtxtFile := 'c:\textNav.txt';
txtfile.open(pathtxtfile);
txtfile.textmode;
repeat
txtfile.read(v_lijn);
NaviPrinter.DirectPrint(PrinterName,v_lijn);
until txtfile.pos >= txtfile.len;
txtfile.close;
What is wrong ?
Thx0 -
Try to set the printer to print into file and check if there is something in the file after that...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