Forum Discussion

JeffMickelsen's avatar
JeffMickelsen
Qrew Cadet
7 years ago

How do I display a picture on a form or report with a specified height and/or width?

I need to capture pictures from an iPhone and then display them on the form with a specific height and/or width. I have been able to capture the picture using a file attachment field. I have not been able to get the right syntax for displaying the resized picture.

Any help is appreciated.
  • Hi Jeff,

    No worries. Here you go.

    If([Your attachment field]=null,null,"<img src='"&URLRoot()&"/up/" & Dbid () & "/a/r" & [Record ID#] & "/e217/v0' height='16' width='20' />")
    Replace 217 with your attachment field ID and adjust height and width as per your need.

    Thanks,
    Gaurav
    • MCFNeil's avatar
      MCFNeil
      Qrew Captain
      Keep in mind that if you want to keep proper aspect ratios on the images, pick only one dimension to control.  Choose either height or width, not both.

      I personally like height because it makes reports more consistent.
  • Try appending a space and then

    width='75' >

    If you are able to post you current formula I can help more