The Image Link Formatter option in Column Formatting embeds an image within the report by processing the column value, that is a URL link, into an image displayed in HTML image tags within the report listing.


To embed an image in a report listing, follow the steps below:


Pre-requisite: The column value that will be displayed as an image must have URL links as column values stored in the database.


  1. Login as an authorized user.
  2. Click on the Plus sign that appears at the top right corner and select Report.
  3. On the New Report window, click on a metric view that will form the basis of your analysis. Here, for instance, the Site Performance view is selected. 
  4. On the report interface, add your required data fields.
  5. To drag a data field in the Columns box, expand one of the folders that appear in the left pane of the report interface window and by using the click-and-drag method on the columns, populate the Columns box. You can use the search box, presented above the folders, to search for a specific column. Here, for instance, Current Count of Sites Activated (aggregate function), Study ID, Site Region, and Site Country are selected. 
  6. Open the field menu on the column Site Country which will showcase the images and then select Format and then Edit.
  7. In the Column Formatting window, in the Format box select Image Link Formatter.
  8. Enter a URL in the Default Image box that will fetch an image if the column values in the database do not contain the desired image-specific URLs.
  9. You can specify the image width and height as a numeric value in the Image Width and Image Height box respectively. The numeric should be a value in pixels.
  10. Click the Cross icon to save the changes. 
  11. As seen above, we are not able to see the images in the Site Country column as there may not be a column that can be fetched from the table that contains image links as values. To obtain images that correspond to the site region column, we can set up a calculated field that will help us retrieve the images.
  12. Click the plus icon that appears at the bottom left corner as shown above.
  13. In the Calculated Field window, provide the following inputs:
    1. Calculated Field Name: Specify a unique name for the calculated field. This will be used across all reports and dashboards. Here, for instance, the calculated field name is Site Region Image.
    2. Formula Type: Here, the type is chosen as Simple.
    3. Resulting Field Type: Here, the value Auto Detect is chosen.
    4. Build a Case - When - Then statement to specify values that will be fetched from a specific column and insert the corresponding image links (jpeg links) in the Then clause. Here, for instance, the column values are picked up from the Site Region column and if that holds true then corresponding image links (jpeg links) are inserted in the Then clause. Repeat for all the column values in the Site Region column.
    5. Click End to close the Case-When-Then statement syntax.
    6. Click Validate to validate the SQL query statement.
    7. Click Save to save the calculated field.
    8. From the left pane, select the calculated field and drag it across to appear in the Columns box and you can insert it next to the Site Region column or in the order you wish to see it in.
    9. Open the field menu of the Site Region Image column and select Format and then select Edit.
    10. Select Image Link Formatter in the Format box. Specify the width and the height of the image in the Image Width and Image Height box respectively.
    11. The resultant table is shown below. The report list is filtered on a specific study name and you can see the images in the derived column (calculated field) that match the site region column values.

               

Note: For any new value in the column that cannot be matched to any image link in the SQL query statement, the calculated field (here, Site Region Name) will fetch the image from the jpeg image link inserted in the Default Image box seen in the column properties, as shown below.