VERIFIED SOLUTION i

How to embed Document Link images in a Report Template in Confirm

Products affected: Confirm®
Product feature: Ad Hoc Reporting
 
In Confirm it is possible to embed Document Link images from the Document Store into custom Report Templates.

Create a Data Source including a column that gives the full file path to image in the Document Link.  Run the Data Source and on the result screen swith to Design mode to create a Report Template.  Then use the Compute (+/=) button to locate where the image should be placed.

The images need to be in .jpg or .png format.

Draw a box in the visible area of the Report where you want to present the image.  In the Expression Object Properties dialog box type,
bitmap(<photoField>)
where <photoField> is the name of the image field defined in your Data Source.

An example SQL query for SQL Server is shown below:

 
SELECT
   central_enquiry.enquiry_number,
   central_doc_link.document_name,
  CASE
     WHEN ss_store.setting_value = 'F' AND
          LEFT(central_doc_link.document_name, LEN('$Document$')) =  '$Document$'
       THEN
         REPLACE(central_doc_link.document_name, '$Document$', ss_link_path.setting_value + '\' )
      WHEN ss_store.setting_value = 'F' AND
          LEFT(central_doc_link.document_name, LEN('$Document Store$')) =  '$Document Store$'
      THEN
         REPLACE(central_doc_link.document_name, '$Document Store$',ss_link_path.setting_value + '\' )
      ELSE central_doc_link.document_name
   END as Photo
FROM
   central_doc_link,
   central_enquiry,
   system_setting ss_link_path,
   system_setting ss_store
WHERE
   central_doc_link.entity_key = central_enquiry.enquiry_number AND
   central_doc_link.entity_type = 'ENQUIRY' AND
   central_doc_link.document_number = 1 AND
   central_doc_link.document_name IS NOT NULL AND
   ss_link_path.setting_id = 'DOCUMENT_LINK_PATH' AND
   ss_store.setting_id = 'DOCUMENT_STORE';

In the above example
  • central_doc_link.document_number = 1 means the first Document Link on the Enquiry.
  • ss_link_path.setting_id = 'DOCUMENT_LINK_PATH' is the Document Store Folder field on the Document Links System Settings screen.
  • AND ss_store.setting_id = 'DOCUMENT_STORE' os the Document Store field on the Document Links System Settings screen.  'F' stands for 'Folder'.
These are steps to create a Report Template with a Document Link image.
User-added image

Run the Data Source
User-added image

Switch to Design mode and type the bitmap function.
User-added image
User-added image

Save the Report Template
User-added image

To view open the Report Template screen and select View.
User-added image
User-added image
User-added image


NOTE: Paths to a BMP, GIF, JPEG, RLE, or WMF file on a network drive will show the image but URLs are not supported.
UPDATED:  February 20, 2019