bullzip problem

impotenceimpotence 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 ?
END is well that all is well ~~~

Answers

  • maris2000maris2000 Member Posts: 71
    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 variables
    Name	                         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.
  • maris2000maris2000 Member Posts: 71
    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.
  • impotenceimpotence Member Posts: 20
    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 ~~~
  • impotenceimpotence Member Posts: 20
    maris2000,

    sorry .... i have find out that all the error causing by my typing error ! :oops: ](*,)
    it is fixed ! =D> thx for your teaching !! :lol:
    END is well that all is well ~~~
  • maris2000maris2000 Member Posts: 71
    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 :)
  • impotenceimpotence Member Posts: 20
    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 ~~~
  • maris2000maris2000 Member Posts: 71
    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.
  • impotenceimpotence Member Posts: 20
    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 ~~~
  • maris2000maris2000 Member Posts: 71
    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=136022
  • impotenceimpotence Member Posts: 20
    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 ~~~
  • maris2000maris2000 Member Posts: 71
    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. :D
  • krikikriki Member, Moderator Posts: 9,110
    [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!


Sign In or Register to comment.