Shrink picture on report

JosetxoJosetxo Member Posts: 92
Hello,

I have designed a report that holds a PictureBox. The SourceExpression for that object is a reference to the form that holds the BLOB filed for the picture.

The report shows the picture, but it does not autimatically adjust the size of it. Is it possible in Navision, when the image size exceeds the picture box size in the report, to adjust it?

Thanks in advance,
Josetxo

Comments

  • matttraxmatttrax Member Posts: 2,309
    In a word...No. At least not that I have ever seen or read about. Would be nice, though.
  • kinekine Member Posts: 12,562
    No by default. Search for "resolution" on the forum to find the ways how to change the resolution in the bitmap to change the size of your picture.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • ravnenravnen Member Posts: 12
    Write your own automation :)
  • grpresetgrpreset Member Posts: 7
    I used that for showing external pictures on item card:

    Form - OnAfterGetRecord()
    SETRANGE("No.");
    Path := rInvSetup."Pictures path";
    WindowsStyle := 0;
    WaitForCommand := TRUE;
    TempPath := ENVIRON('TEMP');

    IF EXISTS (Path + "No." + '.jpg') THEN BEGIN
    CREATE(Wshell);
    Cmd := Path+'jpg2bmp.exe -outfile '+TempPath+'\'+'temp.bmp -color 256 -bmp -scale 1/2 '+Path+"No."+'.jpg';
    Wshell.Run(Cmd,WindowsStyle,WaitForCommand);
    CLEAR(Wshell);
    Picture.IMPORT(TempPath+'\'+'temp.bmp',FALSE);
    END ELSE BEGIN
    CLEAR(Picture);
    END;

    Of course it took me a while to gather all the info from this form. THX to ALL.
    =;
    Next task is to do the same on a report. :whistle:
  • Marije_BrummelMarije_Brummel Member, Moderators Design Patterns Posts: 4,262
Sign In or Register to comment.