bullzip problem
impotence
Member Posts: 20
hi all,
i am a newbie of NAV , and i want to using bullzip PDF printer for C/AL.
do i need to register bullzip in NAV at 1st ? for other language (C++, VFP .. ) , i can using createobject to programming , but ... how can i do it in NAV ?
and i had wrote a program to send mail for some purpose with VFP. how can i call this VFP program from NAV ? app or fxp format is needing ? and can i using the fll (VFP's library) file in NAV ?
i am a newbie of NAV , and i want to using bullzip PDF printer for C/AL.
do i need to register bullzip in NAV at 1st ? for other language (C++, VFP .. ) , i can using createobject to programming , but ... how can i do it in NAV ?
and i had wrote a program to send mail for some purpose with VFP. how can i call this VFP program from NAV ? app or fxp format is needing ? and can i using the fll (VFP's library) file in NAV ?
END is well that all is well ~~~
0
Answers
-
To use Bullzip in NAV you have to install it on your computer. Try to download BioPDf from http://www.biopdf.com/guide/(it is the same, you have more info on the page). In navision you will nedd a variable of automation datatype, for the subtype you choose the biopdf .
I have an exaple you can see here(codeunit)IF ISCLEAR(BioPDF) THEN CREATE(BioPDF); InoviceNo := '103002'; ReportID := REPORT::"Sales - Invoice"; FileDirectory := 'C:\'; Object.GET(Object.Type::Report, '' ,ReportID); FileName := InoviceNo + '.pdf'; BioPDF.Init; BioPDF.LoadSettings; RunOnceFile := BioPDF.GetSettingsFileName(TRUE); BioPDF.SetValue('Output', FileDirectory+FileName); BioPDF.SetValue('Showsettings', 'never'); BioPDF.SetValue('ShowPDF', 'no'); BioPDF.SetValue('ShowProgress','no'); BioPDF.SetValue('ShowProgressFinished','no'); BioPDF.SetValue('SupressErrors','yes'); BioPDF.SetValue('ConfirmOverwrite','no'); BioPDF.WriteSettings(TRUE); SalesInvoiceHeader.GET(InoviceNo); SalesInvoiceHeader.SETRECFILTER; REPORT.RUNMODAL(ReportID,FALSE, FALSE, SalesInvoiceHeader); TimeOut := 0; WHILE EXISTS(RunOnceFile) AND (TimeOut < 10) DO BEGIN SLEEP(1000); TimeOut := TimeOut + 1; END;
You will need the following variablesName DataType Subtype BioPDF Automation 'bioPDF'.PDFPrinterSettings FileDirectory Text FileName Text ReportID Integer Object Record Object SalesInvoiceHeader Record Sales Invoice Header RunOnceFile Text TimeOut Integer InoviceNo Code
In my example Sales Invoices are printed, no request form. If you need request form just change settings.0 -
I don't know much about VFP, in nav 2009 you have addins see in the documentation if it is relevant for you problem. I just know that you can write code in .net for addins, but please read the dokumentation.0
-
maris2000,
many thx for your teaching ! according your sample , i have change the InvoiceNo and replace bioPDF to bullzip all. but ... when i try to run , the NAV prompt me the error :
This message is for C/AL programmers:
This Automation variable has not been instantiated.
You can instantiate it by either creating or assigning it.
I have assigned the bullzip as a Variables in C/AL Globals with Data Type : Autonation and subtype :'Bullzip'.PDFPrinterSettings already! do i have missing something ?END is well that all is well ~~~0 -
maris2000,
sorry .... i have find out that all the error causing by my typing error ! :oops: ](*,)
it is fixed ! =D> thx for your teaching !!
END is well that all is well ~~~0 -
You are very welcome. I am glad that i could be of assistance.
It would be very helpful for others, if you mark your post as solved.
Greetz Maris
0 -
maris2000,
sorry ! i find that i need to set the Bullzip PDF Printer as default printer for the coding work .
is it my problem ? or i need to change the setting of default printer when running the code and change it back to the original one after ? i know that The Printer Virtual Table is 2000000039 , but it never mentioned which is the default one. how can i change the default printer by code ?END is well that all is well ~~~0 -
You use the Printer Selection table to do this.
If you go to Adminstration>Printer Selections> you get Printer selection form, and here you can set which printer you would like to use. Sorry I forgot about this.0 -
maris2000,
i think i have misleading you before .
normally, the colleagues will printing the report (e.g. Quotation ) by default printer (a laserjet) , but ... sometime they want to send the quotation to customer by email via NAV directly , so i have design to print the Quotation to PDF format (for filing) at 1st and send this PDF to customer by email (CodeUnit 400). however the Administration > IT Administration > General Setup > Printer Selections can't fulfill this purpose. that's why i want to change the default printer by coding.END is well that all is well ~~~0 -
ok, then you have to use Codeunit 1.
Her is an example how to :IF SI.GetUsePDFCreator THEN EXIT('PDFCreator'); Function in SI is like this SetUsePDFCreator() UsePDFCreator := TRUE; GetUsePDFCreator() : Boolean TMPUsePDFCreator := UsePDFCreator; UsePDFCreator := FALSE; EXIT(TMPUsePDFCreator);The code is from the post below. There is lot of relevant info for you in the post.
Hope it helps
http://mibuso.net/forum/viewtopic.php?p=1360220 -
hi maris2000,
many thx !!!
i have solved my problem ! really i don't understand the code about SingleInstant , and why it work (maybe i am quite stupid .. :oops: ) ... but i find that .. i just need to fill in the user name and printer name in table 409 (printer slections) .. and the Bullzip will work fine even has not set it be the default printer !END is well that all is well ~~~0 -
Glad you solved your problem. You are not stupid at all, it's navision.
When I started to work with Navision, I felt that I was stupid too.
Fortunately we have Mibuso.
0 -
[Topic moved from 'NAV 2009' forum to 'NAV/Navision' forum]Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!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
- 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
- 328 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