Dynamically change background image on a label based on data field

Issues related to label design (working with databases, data processing, RFID encoding etc.) and printing (from NiceLabel Express, NiceLabel Pro, NiceForm and NicePrint)

Moderators: Georges, milos, NiceLabel Support Team

Post Reply
nordicapproach
Newcomer
Posts: 1
Joined: Fri Apr 12, 2019 2:09 pm

Dynamically change background image on a label based on data field

Post by nordicapproach » Fri Apr 12, 2019 2:21 pm

Hello!

We are a green coffee importer, and send out a lot of samples with coffee, from 11 different origins. Currently we have a nice label that has a picture in the background. Ideally what we want is that based on the origin of the coffee, it should use an image from that origin. So somehow have 11 different images, then if the coffee sample is from Rwanda, choose the Rwanda picture. If the coffee sample is from Colombia, choose the Colombia picture. Is this possible?

it gets all the other info from a spreadsheet automatically, like the name, area, country, price and how many kilos are available. But how do we do it with images?
label_test-min.png
label_test-min.png (248.77 KiB) Viewed 59 times

User avatar
Mytch
NiceLabel Support
NiceLabel Support
Posts: 39
Joined: Fri Jul 13, 2018 10:26 pm
Location: Milwaukee, Wisconsin
Contact:

Re: Dynamically change background image on a label based on data field

Post by Mytch » Fri Apr 12, 2019 7:28 pm

nordicapproach,

Setting a variable image under Document (Label) Properties > Style > Background picture is not currently supported, however, there is an easy alternative when the standard Picture object from the toolbox.

Firstly, your variable images must be defined in a database field for each record that will define the picture's location. This can be the full UNC path to the image (C:\Some\Path\image.jpg) or a relative path to an image located next to or near the Solution file itself (..\Graphics\image.jpg). The data source of your Picture object should be the relevant database field with the file location, so when a record is selected for printing, the path is passed into the Picture's source.

See the screenshot below for an example:
screenshot_19.jpg
screenshot_19.jpg (224.3 KiB) Viewed 43 times
In this case, you should also ensure to properly Arrange the objects by sending the Picture to the back. See the screenshot below:
screenshot_06.jpg
screenshot_06.jpg (130.96 KiB) Viewed 43 times
Mytch

Post Reply