Wiki

Scale Your Enterprise

User Tools

Site Tools

mbstring extension must be loaded in order to run mPDF

versago:images_in_reports

This is an old revision of the document!


Using Images in Versago Reports and Forms

The following image formats are supported.

  • PNG (preferred)
  • JPG
  • GIF
  • BMP (not recommended)

Each image must be provided in four (4) sizes.

  • 45 x 45 for thumbnail image
  • 65 x 65 for thumbnail image
  • 250 x 250 for mouse-over (hover) image
  • 1024 x 1024 for on-click (large) image

Images are held in the folder C:\Program Files(x86)\TWBS\Versago\WebApp\SiteImages.

The images must also be registered in the Versago common database in the versago_image_files table. A Bizweaver workflow is available to assist with this process. Images can also be registered manually as described elsewhere in this page.

Sample SQL Using Images

This example displays a list of production orders with an image of the finished product.

  • The database for “vgoCommon” may need to be changed for your installation.
  • “isnull(t1.filepath,'\SiteImages\NoImage_45.png')” assumes you have an image to be displayed when an actual image is not available.
  • Use either “45” or “65” in the selection. 45 is used in this example. The other sizes (for the other thumbnail, image rollover and image click) are determined automatically by Versago.
SELECT
t0.ItemCode, t1.ItemName, isnull(t2.filepath,'\SiteImages\NoImage_45.png') AS [ImagePath], t0.DueDate, t0.Status, t0.DocEntry, t0.DocNum
FROM OWOR t0
INNER JOIN OITM t1 ON t0.ItemCode = t1.ItemCode
LEFT JOIN [vgoCommon].dbo.[versago_image_files] t2 ON t0.ItemCode = t2.IntersectionID COLLATE database_default
WHERE t0.Status IN ('R','P')
AND isnull(t2.filepath,'\SiteImages\NoImage_45.png') LIKE '%45%'

Register Images Using Bizweaver

In most cases, using a Bizweaver workflow will be the quickest and easiest way to register images for use with Versago. A standard workflow named “Versago Image Loader” is available from Third Wave as a download from https://portal.twbs.com (login required). Following are the steps to use the workflow.

  • Create the four sizes of each image as noted above. There are a number of applications that can assist with this process. One that Third Wave has used with good success is FastStone Image Resizer (www.FastStone.org).

The Bizweaver process provided by Third Wave assumes that the file name is structured as ID_Size. As an example for image A00001, the file names will be A00001_45, A00001_65, A00001_250, and A00001_1024.

Further, the “ID” is used to map to a value in the Versago report. In the previous example, “A00001” will map to an item number in SAP Business One that is included in the report.

  • Place the files in a Windows folder that can be accessed by Bizweaver.
  • Open the Bizweaver workflow. The steps will appear as shown in the following image.

Image Loader Overview

  • Set the variable SourceFilePath in the Variables_Init (as shown in yellow below) step to folder path from the previous step.

Image Loader Variable

  • Execute the workflow
    • The Versago images table is updated with the needed information and the files are copied to the folder used by Versago.
    • If an image already exists for a given ID and size, it will be updated. Otherwise, the new image is added.

Register Images Manually

Versago images are most commonly imported and registered using a Bizweaver workflow. It is also possible to manage image information manually, as described here.

Image Files

Four image sizes are required as noted above. The images should be placed in the older C:\Program Files(x86)\TWBS\Versago\WebApp\SiteImages.

Image Maintenance Form

The Image Maintenance form can be used to update information created through the Bizweaver upload process or to add image information manually.

Image Maintenance

  • File Name is the name of the image file without the extension; for example 12345 rather than 12345.png.
  • File Size is the size of the file in pixels. Values will be 45, 65, 250, or 1024.
  • File Path is the abbreviated file path of the image file. It will always be \SiteImages\FileName.Ext. So using our previous example the entry will by \SiteImages\12345.png.
  • Intersection ID is used to match the image file to its associated object. In the example image below, the image file is associated with item 790824300010.

The file name is typically the same value as its associated object. So item number images carry the associated item number, Business Partner logos would carry the BP Code, etc. This association is how the Bizweaver process works, and should also be used when manually entering image information.

versago/images_in_reports.1594228980.txt.gz · Last modified: 2020/07/08 13:23 by runger