Jpeg in Navision

Helo!

Is it possible for Navision to read jpeg picture format or does it read only bmp?

Thanks for the answer...

lp Prosen
  • Yes it is possible.

    Take a look at form "6220 - Picture Card" in standard Navision (i think 3.00 and higher). It even possible to import gif files with that piece of application.
  • Yes. You may now be able to "import" JPEGs but you cant display them in a report right?! Or do i miss something.
    To Display a JPEG or GIF the Form 6220 calls his Table "Picture" which is using an automation called "'CP Image Selector'.NFInterface" for displaying Images. It open some kind of form you cant design!
    :-(
  • Yes, you are right.

    Display only using this special form.
  • Hi,

    First, no it's unable to use other picture formats on report then BMP. But, you can do it :-)
    Here's some solution.

    In advance, what you must do to get JPEG (or other picture format) on report ? You have to convert this file into bmp and then you can use it.
    Let's have a table f.e. "BMP Buffer" which consists of 3 fields -
    "No." - (PK) Integer,
    "Any Type Of Picture" - BLOB
    "BMP Picture" - BLOB

    1. Now, you need to import JPEG(or other picture file) into this rec.
    txtPath := recBMPFormar."Any Type Of Picture".IMPORT('c:\', TRUE);
    2. Then you need to convert on background (not visible for user) this picture to BMP file
    intResult := SHELL('c:\program files\irfanview\i_view32.exe ' + txtPath + ' /convert=d:\temp.bmp');
    3. Now we have converted JPEG to BMP and we need to import this BMP picture into rec.
    recBMPBuffer."BMP Picture".IMPORT('d:\temp.bmp',FALSE);
    3. You can delete temporary BMP File from HDD
    ERASE('d:\temp.bmp');
    Now you can use anywhere field recBMPBuffer."BMP Picture" as SourceExpr (Form,Report, ..)

    This was only brief type of solution. You can use CommonDialog OCX to select types of picture which you want - *.gif;*.jpg and do not use internal predefined CommonDialog
    You need some convertion program, which converts pictures into bmp (in "silent" mode)
    There exists many modifications, it's only on you what you want.
  • Or you could tell your customer to download a little free program (any program) with which they can covert pics to bmp format. [;)]
  • I would suggest PAINT distributed with Windows as a conversion utility. Most users already have this. File->Open JPEG, GIF, TIFF, etc. . ., File->Save As BMP.
  • Using PAINT is okay for only a few files and manually open a .tif or whatever but it can't be used as a regular conversion routine for many files can it ?
  • Anyone try this tool!?

    http://www.mibuso.com/dlinfo.asp?FileID=92

    This little tool allows you to keep your library of pictures separated from Navision, yet load the picture instantly into Navision when required for display or printing. The picture is converted instantly into the BMP format for Navision, without the user noticing it.
  • quote:
    Originally posted by savatage99

    Anyone try this tool!?

    http://www.mibuso.com/dlinfo.asp?FileID=92



    It doesn't work (in ver. 3.60+ anymore) due to Microsoft? denying access to path's without user clicking the ok button first (ie you must import at least one picture manually and after that (in that session) it works :P).
  • I've downloaded the file this morning but it's not working yet.
    I must be missing something..

    I imported the form 50006. Adjust in OnInit DirectoryName and put some jpg's with the name of some items in the directory.
    I already read somewhere that the path can't be longer than 38 characters. So I did that.
    When I open the form 50006 with item 12345, 12345.JPG in the directory isn't shown. Actually I get a "Run-time error '52' Bad file name or number". And then "No picture available".

    Who has experienced the same problems and knows the answer?

    By the way: Were using 3.60 and when it works in 3.60 I also want to implement it in 2.60.
Related
Recommended