Page 1 of 2

REPORT DESIGNER Insert images based on an expression

Posted: 29 Jun 2011, 06:04
by Steve Parry
I want to include product images in a label layout.
Report Designer Help suggests you can "Insert images based on an expression." But it does not give any details.
We have used the Web tab in Products to link to a web image of our stock items.
Can we use this information to create a labels for cartons, pallet racks that includes an image of the products?
Thanks

Re: REPORT DESIGNER Insert images based on an expression

Posted: 05 Jul 2011, 09:13
by brucedenney
I have played with this functionality, but not done a lot with it so there could be more "features" to overcome, but YES, it is possible. (I have put images onto invoices)

The only issue I had was constructing the expression as there are issue with putting some characters in strings, \ causes problems and has to be done as a \\

The Locking of the aspect ratio didn't seem to work for me the way I wanted so best if all the pictures are the same (aspect ratio) if you want to control the size of things.

This is the expression I used for my test to put an image on an invoice

"C:\\TEMPSAGE\\L50V2011DEMODATA\\ACCDATA\\IMAGES\\"+STOCK.WEB_IMAGE_FILE

You would us something very similar for a label

Add a "Linked" image and when the box pops up to browse just hit the X in the corner to close it, you should then be able to add the expression.

I hope this helps

Re: REPORT DESIGNER Insert images based on an expression

Posted: 06 Jul 2011, 01:54
by Steve Parry
Thanks Bruce, after a bit of fiddling it has worked perfectly. This is brilliant. We will be able to use this in a lot of areas. Genius.

Re: REPORT DESIGNER Insert images based on an expression

Posted: 17 Feb 2014, 16:42
by Rachel_Cubic
Hi. I have a similar issue, trying to put a product image onto a sales order. I've tried using that expression but I'm not sure how to make it work as our file is saved on a network and not on my c drive.

I currently have this as the expression but i'm not sure what i should be putting where the ???? is:

"????\\cubvfile001\\COMPANY.000\\ACCDATA\\IMAGES\\"+STOCK.WEB_IMAGE_FILE

Thanks

Re: REPORT DESIGNER Insert images based on an expression

Posted: 17 Feb 2014, 17:12
by brucedenney
If it is a UNC path then you would want "\\\\cubvfile001\\COMPANY.000\\ACCDATA\\IMAGES\\"+STOCK.WEB_IMAGE_FILE

Re: REPORT DESIGNER Insert images based on an expression

Posted: 17 Feb 2014, 17:30
by Rachel_Cubic
No it doesn't like that either... any other suggestions? thanks

Re: REPORT DESIGNER Insert images based on an expression

Posted: 17 Feb 2014, 17:35
by Rachel_Cubic
No it doesn't like that either... any other suggestions? thanks

Re: REPORT DESIGNER Insert images based on an expression

Posted: 17 Feb 2014, 17:48
by brucedenney
If you can attach your layout to a post and I will have a look at it.

I have just checked and the UNC syntax works (in a slightly different context) so maybe it is something else.

Re: REPORT DESIGNER Insert images based on an expression

Posted: 18 Feb 2014, 10:52
by Rachel_Cubic
Thanks, I've attached the layout

Re: REPORT DESIGNER Insert images based on an expression

Posted: 18 Feb 2014, 15:56
by brucedenney
I just altered it to point to a valid path on my network (and added an expression so I could see the path as well) and it works fine, see attached pdf.

My only thought is that perhaps you have an error in the path to the images.

Go to help>about and check the path to the data directory.

The path to your images should be the data directory with \IMAGES\ on the end of it. If the path in your report is correct your data directory should be:
\\network\cubvfile001\COMPANY.000\ACCDATA




P.S. You do not need to round the Qty, you can set the number of decimal places in the properties of the field OR you can set the number of decimal places in Sage Settings>Product Defaults>Decimal Precision>Quantity DP

Re: REPORT DESIGNER Insert images based on an expression

Posted: 06 Mar 2014, 15:03
by Rachel_Cubic
thanks i got it working

Re: REPORT DESIGNER Insert images based on an expression

Posted: 06 Mar 2014, 16:35
by brucedenney
What was the issue?

Re: REPORT DESIGNER Insert images based on an expression

Posted: 27 Aug 2015, 14:23
by timwainer
Hello Bruce,

Please help!

Using Sage Report Designer (as supplied with our Sage 50 2015) I am trying to add relevant Product Images into my Sales Orders and Price Lists but am struggling to create an Expression or Data Field that will show the images.

I'm not sure if I have a path error to my image file but I hope for the right person it will be a simple fix
When I use STOCK.WEB_IMAGE_FILE it displays the actual file name that Sage has given the image and not a nice pic!

Any help / advise would be gratefully accepted.

My images folder is here:
R:\SAGE\Company.000\ACCDATA\IMAGES
( R being a mapped network drive)
Its IP is \\192.168.0.18

Ive tried substituting \ with \\ but to no avail

Regards
Tim

Re: REPORT DESIGNER Insert images based on an expression

Posted: 27 Aug 2015, 16:22
by brucedenney
You need to use the insert images based on expression.

The expression should be

"R:\\SAGE\\COMPANY.000\\ACCDATA\\IMAGES\\"+STOCK.WEB_IMAGE_FILE

If you have problems attach the layout to a post and I will see.

Re: REPORT DESIGNER Insert images based on an expression

Posted: 28 Aug 2015, 07:40
by timwainer
Good Morning Bruce
That's fantastic thank you.

All sorted - many thanks

Have a good Friday
Regards,
Tim