How to display Image from File Path Name without using BLOB

william_marcelinuswilliam_marcelinus Member Posts: 34
edited 2012-07-19 in NAV Three Tier
Excuse me, im new in this forum and learning NAV's :D

Here is my problem,

It seems i cant display any picture from a path name eg: C:\test.jpg to a specific field in a page. ive been try using some

InStream and Declare it as BigText, but i didnt found any type of variable to load an InStream data to a field. heres my latest try :


IF NOT ISSERVICETIER THEN
EXIT;
FileToDownload := 'C:\try.bmp';
FileVar.OPEN(FileToDownload);
FileVar.CREATEINSTREAM(IStream);
BStr.READ(IStream);
FileVar.Close;



when im try to use BStr as Sourceexpr its just give a text ](*,) , how can i display the picture from InStream without using XML DOM or inserting to record as BLOB, or its not possible for me to do this? thanks for your reply. [-o<

Answers

  • kinekine Member Posts: 12,562
    You do not need to "insert" it into BLOB. It is enough only to stream it through temporary blob (table TempBLOB is already part of the standard DB). Read the picture into it and display it where you need, without inserting it into the table...
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • william_marcelinuswilliam_marcelinus Member Posts: 34
    kine wrote:
    You do not need to "insert" it into BLOB. It is enough only to stream it through temporary blob (table TempBLOB is already part of the standard DB). Read the picture into it and display it where you need, without inserting it into the table...

    Thanks For Reply Kine,

    Ive Solved this problem using InStream and OutStream and keep the temporary image in CREATEOUTSTREAM function, and yes i need that temporary BLOB field, and successfully i dont need to keep or store any record in that field AT ALL \:D/ and by the way i've
    solved this by myself although im newbie in nav :D and thanks for reply kine hope we can share more knowledge again :D
Sign In or Register to comment.