Viewing a BLOB field

NaveenReddyNaveenReddy Member Posts: 53
HI
I imported a pdf file in to Blob field. Now i want to view this pdf file using an acrobat reader on pushing a button in navision. Is anybody have any idea how to do this ?

Thanks
Naveen.

Comments

  • IvoSIvoS Member Posts: 7
    Try something like this:
    Rec.CALCFIELDS(Pdf);
    Rec.Pdf.EXPORT('c:\tmp.pdf');
    SHELL('cmd /c c:\tmp.pdf');
    ERASE('c:\tmp.pdf');
    
    Ivo
  • apprinsapprins Member Posts: 4
    You can also use HYPERLINK instead of the SHELL command to start the associated program.
    Rec.CALCFIELDS(Pdf); 
    Rec.Pdf.EXPORT('c:\tmp.pdf'); 
    HYPERLINK('c:\tmp.pdf'); 
    ERASE('c:\tmp.pdf');
    

    HTH

    André
    André P. Prins
    Twain Development
  • jksjks Member Posts: 277
    Hello NaveenReddy,

    Can you tell me how can i import data to a blob field.?

    Is it possible to import data to a blob field from excel sheet?

    Please help.
  • Ravi_ThakkarRavi_Thakkar Member Posts: 392
    Hello all,

    I refered the solution provided by 'apprins'.
    Really a nice sollution to open the file directly without exporting it to HDD.
    But, in that code when Errase fuction is called at that time it is showing the error as shown in the attachment. Because the specified file is in already use, it is not alowing to erase that file.

    Please do you have any idea to prevent this?
    Ravi_Thakkar
    Ahmedabad, Gujarat, India
    E Mail : ravi.thakkar@hotmail.com
  • garakgarak Member Posts: 3,263
    sorry Ravi, also in this case you export the file to HDD.
    See this code snippes
    Rec.Pdf.EXPORT('c:\tmp.pdf');
    the erase command will only delete the before exported file, but this file is in use. And it can you binr also in trouble. For example the Excel App need to load (Nav doesn'T wait) but NAV was deleting the file .....

    So, where is your problem? Should the user only see the excel file without changing? Should he change the file and import it back to the system or what he should do? And for exporting to HDD use the user specific Temp Path.

    Regards
    Do you make it right, it works too!
Sign In or Register to comment.