Displaying an Image for a Record
Stonefield Query can display images in a report in one of three ways. In all three cases, do the following:
- Create a Quick Report as you normally would.
- Turn on the Advanced layout setting in Step 5 of the Quick Report Wizard, then click the Edit button to bring up the Advanced Report Designer.
- Add a picture object to the report.
However, the properties for the picture you set in the Picture Properties dialog depends on the type of image.
- If a Memo or Blob field in a table contains an image (not the path and name of an image file on disk but the actual image itself), choose Expression or variable name for the image source type and enter the "real" table and field name (for example, "CUSTOMER.IMAGE") for the Image source. Alternatively, you can bring up the Expression Builder and select the desired field there.
- If one of the fields in a table contains the path and name of an image file on disk (such as a BMP or GIF file), choose Expression or variable name for the image source type and enter the "real" table and field name in parentheses. Alternatively, you can bring up the Expression Builder and select the desired field there, then add parentheses around it. The parentheses are important: they tell Stonefield Query the field doesn't contain an image but instead the location of an image. For example, if the name of the image file is stored in COMPANY.IMAGEFILE, enter "(COMPANY.IMAGEFILE)" for the field name. Note that the field you use for the image must contain a valid image file name for every record in the report or you'll get an "invalid path or file name" error. In that case, set a filter on the report for that field not being empty.
- If one of the fields in a table is a General field containing an image, choose General field name for the image source type and enter the "real" table and field name (for example, "CUSTOMER.PICTURE") for the Image source. Alternatively, you can bring up the Expression Builder and select the desired field there.