Adding Images to Stock Records

COBS Tech Support
Site Admin
Posts: 105
Joined: Sat May 15, 2021 9:57 am

Adding Images to Stock Records

Post by COBS Tech Support »

This is one suggested approach for adding images to stock records.

Images are assumed to be located in the folder c:\images. Change "c:\images" to a drive letter and path that is accessible to all users who access CAPITAL software.

Place your images in this folder and rename them to match the product code of the items in stock control. For example if your product code is ABC-12345 then the file name of the image should be ABC-12345.JPG if the picture is a JPG image or ABC-12345.BMP if the picture is a BMP image.

Note: You cannot use this approach if your product codes contain reserved characters not allowed by Windows (certain punctuation symbols such as: \ and /, ", < >, ? or *)

1. Log all users out of CAPITAL.
2. Log in with an administrator level password.
3. From the main menu select Special|Screen Builder.
4. Select Stock Control, and press Open.
5. Select Insert|Picture from the main menu.
6. Position the mouse where you want to place the picture and click the left mouse button. (Also resize the image by dragging the mouse as applicable.)
7. Press OK.
8. Double-click on the picture object and press the Formula tab.
9. Paste the following script into the edit area:

Code: Select all

PictureLocation := "c:\images"
PictureFileName := Alltrim(SCRRead("Name"))

If IsFile(PictureLocation + "\" + PictureFileName + ".JPG")

If IsFile(PictureLocation + "\" + PictureFileName + ".BMP")

PictureLocation := ""
PictureFileName := ""
10. Press OK, and select File|Exit from the menu.
11. When prompted save your changes.