[solved] Print Sequence of escape in NAVISION
rossale
Member Posts: 26
Hi,
I would like to send a sequence of ascape to a printer by building a report? Is it possible ?
I read about an OCX (See this http://www.mibuso.com/dlinfo.asp?FileID=341) made by Ing. Kamil Sacek. Could every one help me to use it ? I'm really new in development on NAVISION.
Thanks a lot !!
Alex
I would like to send a sequence of ascape to a printer by building a report? Is it possible ?
I read about an OCX (See this http://www.mibuso.com/dlinfo.asp?FileID=341) made by Ing. Kamil Sacek. Could every one help me to use it ? I'm really new in development on NAVISION.
Thanks a lot !!
Alex
0
Comments
-
I can help you, because it is my software... :-)
If you install the ocx and you will create Automation variable for it ('NaviPrinter Library'.NaviPrinterClass), the variable has one method DirectPrint with two parameters. First is name of printer (look into Pritner table for the names of available printers) and second one is string with the data which will be direclty send to the printer. And that's all... :-)0 -
Hi Ing. Sacek, Thank's for your answer. I don't find the Printer Table... what is the number? Is possible to configure?
Thank's
Alex0 -
The printer table is virtual table no. 2000000039. For more info search the forum for Virtual and Tables.0
-
And it is not possible to configure, it is just "send this to this printer". Original purpose was to send data to LCD screen connected on the parallel port.0
-
Hi Ing. Sacek, I've finally found the printer's table (thanks). Now, when I execute the CU, it show this error: "This Automation variable has not been instatiated... etc.".
This is the sequence that i've done:
1) I've registered your dll with REGSVR32
2) I've created a new CU and instantiate a variable (named NaviPrint) of type "Automation" referencing 'NaviPrinter Library'.NaviPrinterClass.
3) I've created two other variable:
pathtxtFile - Text - 30
PrinterName - Text - 50
4) Then in OnRun() event:
pathtxtFile := 'c:\text.txt';
PrinterName := '\\Printer\Generic / Text Only';
NaviPrint.DirectPrint(PrinterName, pathtxtFile);
What's wrong?
Thank's ](*,)
Alex0 -
Use create for the automation variable.
Regards
Thomas0 -
Thank you Thomas.
Now I try.
Alex0 -
Hi,
it work!! Actually only on local printer... :?
Have this DLL a limit of size of th printing variable? I have to print a heuge sequence of ascape (around 830 char....) containing some special characters (like { or ; or , ) .
How can I do?
Thanks to all.
Alex0 -
The string can be max. 1024 char long (because NAV is not able to use longer strings). In C# it is String...0
-
rossale wrote:Hi,
it work!! Actually only on local printer... :?
It is working over Terminal Services too, you just needs to send the data to correct network printer.... :-)0 -
Hi,
I've a problem: ](*,) when I execute the CU, now it show this error:The Text '.............' is too long. Text can have a maximum length of 30 character
What does it means? The string wasn't max. 1024 char long ?
I'm sure that I do some errors but I don't know how to do.
Thanks
Alex
I enclose the source.
In OnRun() Event:txtFile.WRITEMODE := TRUE; txtFile.TEXTMODE := TRUE; txtFile.QUERYREPLACE := TRUE; txtFile.CREATE('c:\textNav.txt'); txtFile.CREATEOUTSTREAM(strOutStream); strOutStream.WRITETEXT('{D0370,0400,0350|}{T20C52|}{AX;+000,+000,+00|}{AY;+00,0|}{C|}{PC000;0377,0300,10,15,T,22,B|}'); strOutStream.WRITETEXT('{PC001;0361,0262,05,05,B,22,B|}{PC002;0380,0144,05,05,A,22,B|}'); strOutStream.WRITETEXT('{PC003;0380,0121,05,05,A,22,B|}{PC004;0380,0095,05,05,A,22,B|}'); strOutStream.WRITETEXT('{PC005;0380,0070,05,05,A,22,B|}{PC006;0380,0045,05,05,A,22,B|}'); strOutStream.WRITETEXT('{PC007;0380,0020,05,05,A,22,B|}{XB00;0311,0251,5,3,03,2,0060,+0000000000,020,1,00|}'); strOutStream.WRITETEXT('{RC000;X.XXXX |}{RC001;XXXXXXXXXXXXX XXX|}'); strOutStream.WRITETEXT('{RC002;XXXX |}'); strOutStream.WRITETEXT('{RC003;XXXX |}'); strOutStream.WRITETEXT('{RC004;XXX.XXX |}'); strOutStream.WRITETEXT('{RC005; |}{RC006; |}{RC007; |}{RB00;4002154654441|}'); strOutStream.WRITETEXT('{LC;0000,0325,0700,0325,1,4|}{RM;-00-00|}{XS;I,0001,0002C5200|}'); txtFile.CLOSE; CREATE(NaviPrint); pathtxtFile := 'c:\textNav.txt'; txtFile.OPEN(pathtxtFile); PrinterName := 'StampaSuFile'; NaviPrint.DirectPrint(PrinterName, txtFile.READ(pathtxtFile));
And in GLOBALS:-
txtFile File
pathtxtFile Text 30
strOutStream OutStream
NaviPrint Automation 'NaviPrinter Library'.NaviPrinterClass
PrinterName Text 50
0 -
txtFile.READ(pathtxtFile) is reading the line into the parameter and not from the file you pass as parameter... :-) read the documentation...0
-
=D>
IT WORKS VERY WELL THIS DLL!! GREAT!!
Now it work correctly also the correct network printer !!!
Thanks.
Alex0 -
You are welcome! (and just one thing: the DLL is just simple example from Microsoft pages compiled into form usable by NAV - see http://support.microsoft.com/kb/154078)
And please, should you add [solved] prefix into the first post subject? Thanks.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 117 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
- 333 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 991 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
