Sage 200 Report Designer - How to show product images on a report / layout
Description

NOTE: There is currently no functionality within Sage 200 Standard or Sage for Education that fulfils this requirement. 

If required, you can also amend reports / layouts to display these product images in Sage 200. This article explains how to add the product images to the SOP Invoice (Single).layout or Stock Levels report. You can use the same steps to edit other reports / layouts.

If you would like the image to appear on the same line as the product information follow the steps on the Same section tab.

Your stock items / lines may not all have images attached to them so to reduce the space needed on each report / layout you can include the image in a separate section. Follow how to do this on the Different section tab.

The filename of the image must be alpha numeric and not contain any illegal characters, for example, £, @, { etc.

This article assumes that you have located the report or layout that you want to amend and opened it in Sage Report Designer. If you need further help with this, please refer to article .

This article has been prepared and issued to you as a goodwill gesture only and Sage accepts no liability or responsibility for its use. For further support please refer to your Business Partner.

Cause
Resolution
CAUTION: For this process to work your stock codes must not have punctuation or special characters as part of the code. ie Computer_Desk or Computer/Desk.

If any of the panes mentioned in this section are not visible, open the View menu and select the required pane. If the pane doesn't appear, you can reset the Report Designer view to its default. For further information about this, please refer to article .
To check the path to your company data
  1. Sage 200 - C:\ProgramData\Sage\Sage200, the next folder will depend on the version installed. This will start with 20.0 then the version as below:
    • Summer 2017 Enhancement = .3.0
    • Winter 2017 Enhancement = .7.0
    • Spring 2018 Enhancement = .13.0
    • Summer 2018 Enhancement = .20.0

    So for example the full path will be C:\ProgramData\Sage\Sage200\20.0.20.0, if the installed version is Sage 200 Summer 2018 Enhancements.

    Within the folder open the file Sage200CommonAppSettings.config using notepad and make a note of the Data Directory

  2. Sage 200 Professional 2013 and above - C:\Program Files (or Program Files (x86))\Sage\Sage200\Sage200CommonAppSettings.config > Open with notepad > Make a note of the Data Directory.



  3. Sage 200 Professional 2010 or 2011 - C:Program Files (or Program Files (x86))\Sage\Sage200\svn4win.ini > Open with notepad > Make a note of the Data Directory.



  4. File > Exit.

You have now checked the path to your company data.

Location of the images
  1. Create a folder called 'Images' within the data path.
  2. Copy all the product image files into this folder.
  3. Rename each image file to match the stock code.
Adding the Stock Item Code to a new field in the record.
  • Find a field within the stock record which is unique to each record and is currently not being used, examples would be the Part no. or Manufacturer fields.
  • Insert the stock item code into it for all records that have an image created in the previous section.
To add the image for the product to the report - Report Designer v1.4

Tip: You can check your Report Designer version in Help > About > Application > File Version.

  1. Sections > Add Section > Group Header and Footer.
  2. Add SOPInvoiceCreditLines.SOPInvoiceCreditLineID into the Expression Editor window >. OK.
  3. Select the new section header which has appeared and move it up using the arrows at the right so it appears beneath the first SOPINVOICECREDITLINEID header.

  4. View > Properties > select Height > enter 0.8500 > press Enter.

  5. Select the blank SOPInvoiceCreditLines.SOPInvoiceCreditLineID Footer section.



  6. View > Properties > Suppress Printing > True > Visible > False.



  7. Toolbox > Add Image / Logo > SOPInvoiceCreditLineID Header section > click into a blank space.

  8. Select Build an expression to select an image > OK > enter the following expression:

    "Data path you noted earlier\\IMAGES\\"+ SOPOrderReturnLines.ItemCode + ".jpg"

    When entering the data path, use \\ to separate the folders, for example:

    "C:\\Program Files\\Sage\\Images\\" + SOPOrderReturnLines.ItemCode + ".jpg"

    Note: If you are using Sage 200 Professional on a network and your data path is a UNC path rather than a network drive, you must also add an additional \\ at the start of the path. For example, if your data path is \\server\sage\images\, the expression to use is: "\\\\server\\sage\\images\\" + SOPOrderReturnLines.ItemCode + ".jpg".

  9. Click OK > Properties pane > Size Method > choose Stretch.

  10. View > Preview > OK > if required, resize the images > View > Designer.

You've now added the stock images to the SOP Invoice (Single).layout. You should make any other required changes then save the report.

Note: For further information about saving the document, please refer to article .

To add the image for the product to the report - Report Designer v1.3 and below

Tip: You can check your Report Designer version in Help > About > Application > File Version.

  1. Sections > Add Section > Group Header and Footer.
  2. Add SOPInvoiceCreditLines.SOPInvoiceCreditLineID into the Expression Editor window >. OK.
  3. Select the new section header which has appeared and move it up using the arrows at the right so it appears beneath the first SOPINVOICECREDITLINEID header.

  4. Properties pane > select Height > enter 0.8500 > press Enter.

  5. Select the blank SOPInvoiceCreditLines.SOPInvoiceCreditLineID Footer section.

  6. View > Properties > Suppress Printing > True > Visible > False.



  7. Toolbox > Image (linked) > SOPInvoiceCreditLineID Header section > click into a blank space.

  8. Select Build an expression to select an image > OK > enter the following expression:

    "Data path you noted earlier\\IMAGES\\"+ SOPOrderReturnLines.ItemCode + ".jpg"

    When entering the data path, use \\ to separate the folders, for example:

    "C:\\Program Files\\Sage\\Images\\" + SOPOrderReturnLines.ItemCode + ".jpg"

    Note: If you are using Sage 200 Professional on a network and your data path is a UNC path rather than a network drive, you must also add an additional \\ at the start of the path. For example, if your data path is \\server\sage\images\, the expression to use is: "\\\\server\\sage\\images\\" + SOPOrderReturnLines.ItemCode + ".jpg".

  9. Click OK > Properties pane > Size Method > choose Stretch.

  10. View > Preview > OK > if required, resize the images > View > Designer.

You've now added the stock images to the SOP Invoice (Single).layout. You should make any other required changes then save the report.

Note: For further information about saving the document, please refer to article .

Adding the join

If your report currently has no access to the StockItems table then a join will need creating.

  1. Report > Joins.

  2. Drag StockItems from left hand pain and place into blank area > No to the message.

  3. Connect ItemCode to Code > OK.
Adding the section filter

Without a section filter attached to the document then blank gaps will appear between the Stock Items on the document for those that do not have an image.

  1. Select the section that has had the image inserted into it.



  2. View > Properties > Click into the filter option and select the ellipses.



  3. Select 'Use Advanced Filter' from the window that appears > Expression Editor now appears.






  4. Add the filter using the relevant variables that need to match > OK.



To save the changes to your report

For further information about saving the document, please refer to article or select the Useful links tab above.

You've now saved your amended document.

  1. In this example, we have created a stock item called 'Tulips' and added a file called 'Tulips.bmp' to \\Server\share and mapped it as Y: drive
  2. In Report Designer, amend a report such as Stock Levels, on the report select Toolbox > Image (Linked), click on the report / layout where you want the image to be displayed.
  3. Cancel the "Open" box that pops up where you would normally browse to find the image.
  4. Select the item you added to the layout that shows like this:

  5. View > Properties > Appearance > Expression > Enter the following: "Y:\\"+StockItems.code+".bmp"



  6. View > Preview > OK.
  7. The image will display similar to the example below.

  8. This can also be achieved using a UNC path, with this example the expression would be: "\\\\Server\\share\\"+StockItems.Code +".bmp" rather than "Y:\\"+StockItems.Code +".bmp"


Steps to duplicate
Related Solutions