Item Pictures..

yuppicideyuppicide Member Posts: 410
edited 2010-10-25 in Navision Attain
Navision 3.10.

Here's a screen shot of how my Item Card looks attached to this post.. (shot1.jpg)

You will notice a Picture button. When you click that it'll open up and show you a picture of our item (if it has one) and has a button to allow you to import, export, or delete the picture.

As you can see the screen has a lot of unused space on it. I got to thinking, why can't I just have the picture show up on the right side instead of the main item card page so we don't have to click Picture every time?

If I do need additional real estate I'll move all of the fields in the second column over under the left.

When I click the Picture button and then go to design I'm in Form 364 Item Picture. I've also attached a screen shot of it also (shot2.jpg).

How can I just add that to show up on the main item card page on the right hand side?

Comments

  • matttraxmatttrax Member Posts: 2,309
    You need to click Design from the main Item Card form, not the other form that opens. You can also go to Object Designer and find the Item Card form.
  • ara3nara3n Member Posts: 9,256
    The problem and the developer who made the decision is a sound decision to display the image with outside program.
    If you notice the pictures are in jpg or png whch are compressed pictures.
    Nav only stores bitmaps, which take a lot of space.
    So in order to save space, the picture are stored in a jpg but when you click on view picture it opens outside program.
    You will need to convert all the pictures to bitmap. If you have 1000 pictures and 1 meg in size, that's 1 gig of data that is stored on Item table.
    This will slow down your db and take unnecessary space.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ara3nara3n Member Posts: 9,256
    You could have a second field for picture2 that takes lower quality/smaller size and store that as bitmap and display it on item card.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • matttraxmatttrax Member Posts: 2,309
    How can you tell that the picture in Navision is a jpeg? That's just what it was saved as after it was print screened.
  • ara3nara3n Member Posts: 9,256
    matttrax wrote:
    How can you tell that the picture in Navision is a jpeg? That's just what it was saved as after it was print screened.


    Oh I saw the screenshot again, and it is shown within NAV. It was in full screen, which I didn't realize.

    Yes, he can add a picture box to the item card and display it on item card.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • yuppicideyuppicide Member Posts: 410
    Yes, they are stored as BMP and are in Navision.. not an external program. So, can I just look at the properties of the existing picture box and then add a picture box to the main Item Card page with those properties and it should automatically display the correct picture?
  • matttraxmatttrax Member Posts: 2,309
    There are some other things to do as well. Pictures are a BLOB field so you have to do a CALCFIELDS on it to load it. Look at the code behind the original form you were trying to design. That should lead you in the right direction.
  • yuppicideyuppicide Member Posts: 410
    Okay.. well, here's what I do not understand.

    When I click the Picture button I'm viewing Form 346 - Item Picture. Viewing the buttons properties is "PushAction RunObject". It runs "Form Item Picture" from No.=FIELD(No.) OnOpen.

    Those are all properties of CommandButton. Can I use those properties on my newly inserted PictureBox?
  • SavatageSavatage Member Posts: 7,142
    Add a picturebox to your item card. or in it's own tab if you like.

    The sourceexp of the picturebox will be "Picture"
    you'll have to add to onaftergetrecord of the item card form
    CALCFILEDS(Picture);

    save->compile->enjoy

    We do something similar for our warehouse computers.
    They get their own screen of just data they need & one thing is the pic.
  • yuppicideyuppicide Member Posts: 410
    Thanks. The CalcFields thing is what I needed. I'll post a screen shot tomorrow when I get back to work. I'm at home now.
  • DaveTDaveT Member Posts: 1,039
    Hi,

    If you do not have access to the C/AL code then there is a form property CalcFields which does the same thing
    Dave Treanor

    Dynamics Nav Add-ons
    http://www.simplydynamics.ie/Addons.html
  • SavatageSavatage Member Posts: 7,142
    DaveT wrote:
    Hi,

    If you do not have access to the C/AL code then there is a form property CalcFields which does the same thing
    :thumbsup:
  • HanenHanen Member Posts: 281
    Hi I need to add the logo of the bank in bank account form but I can't add the picture, I don't know how to do that? How can I add the picture? Help!!!!!
    Regards

    Hanen TALBI
  • narendrabararia1971narendrabararia1971 Member Posts: 27
    1. Add a Menu Button - “Import /Insert Logo/Insert Picture in downside Menu Tab

    2. Insert CA/L Code in- OnPush Tab

    PictureExists := Picture.HASVALUE;
    IF Picture.IMPORT('*.BMP',TRUE) = '' THEN
    EXIT;
    IF PictureExists THEN
    IF NOT CONFIRM(Text001,FALSE) THEN
    EXIT;
    CurrForm.SAVERECORD;

    3. Insert Variable in CA/L Globals -
    PictureExists as DataType “Boolean”

    4. Insert Text Constants -
    Name = Text001
    ConstValue = Do you want to import picture or replace the existing picture?

    5. Add Picture Box in the Form change the SourceExpr properties - Picture

    6. Now u can add picture by pushing menu item as defined in Column No.1.
  • HanenHanen Member Posts: 281
    Thaaaaaaaaaaaaaaaaaaaaanks a lot it works :thumbsup:
    Regards

    Hanen TALBI
Sign In or Register to comment.