Printing site logo on forms

We would like to use one PO form for multiple sites, and just have the logo change based on which site is printing a PO. Epicor has some sort of built-in image retrieval in Report Style, but only seems to be available on the Standard style. I tried using the FileStore method, but it looks like this isn’t working for others anyway (see thread below). Next attempt will be Jose Gomez’s UBAQ, but I am not confident I will get that to work. Has anyone else come across a solution to this?

In the RDL, you could place an image control and use a formula to determine image to use based on the Plant.

It wouldn’t use the image stored in the DB, but you could store the images on the SQL server. The expression for the image control woukd point to these.

1 Like

Or embed each logo on top of each other and set a visibility expression to show only for the current plant.

2 Likes

@Mark_Wonsil’s technique is the most portable. The images are in the RDL, and you don’t have to worry about them being the same size, cropping, stretch, etc…

Using referenced image files would allow you to change the image without having to edit the RDL.

But if anyone else knows how to pass an image from the DB (the actual image contents, not a reference to the source file) to a report, I’d love to learn about that. [ bat signal to @Carson ]

@Hogardy had a post that describes this. Basically, the table that stores the images is called Ice.FileStore.

Notice the index to the table is the SysRowID and not a file name. So there’s another table called Erp.Image.

This table contains information about the image file in the image store. The ImageSysRowID in Image links to the FileStore record.

So in your RDD, you need to have an ImageID to get to your Image record. (Make sure to include the necessary fields below in the Exclusions tab) In Part, there’s a field for it. If you’re linking other images, then you’ll need to store the key on that record. For this example, we’ll use Part to get the image on an SSRS report. Add FIleStore and Image to your RDD and then add two relationships:

Part to Image:

Then Image to FileStore:

Add your Content and FileType fields from the Image Store to your DataSet query and the Field list as you would for any other added fields.

Add an image to your report.
image

Choose the Image Source (Database) and select the added Content field.

Finally, you must set the MIME type or you’ll just get a broken image on your report. So click on the Expression button for the MimeType. I made a formula for the various types that we might see but no matter how you do it, make sure it is set.

And you should be good to go.

10 Likes

I had set my image to embedded, not database. Among a few other things, that seems to be the trick. The other issue is that I had created a dataset that for the Image and FileStore join, but didn’t join that to POHeader, since I’m just pulling a logo and filtering ImageCategoryID and ImageID to get the correct one. It only works when I have Image joined to POHeader on Company…is there a way to bypass POHeader for this dataset?

You could add the ImageID to your Plant table (I think that’s in the RDD already :thinking:) and then get the ImageID at the Site record like you would the Part.ImageID.

Plant is stored at the PORel level though. So the assumption is that an entire PO goes to a single plant? So you would have to find another way to link the current plant of the person entering the PO. But once you do, you can then use that as the key to the image.

At this time the best method I have successfully used in several Multi-Company Environments is.

Create Company_UD.LogoPath_c and since its on the Company table it will easily exist in RDDs. You can also then use it in BarTender, BAQ Reports etc…

Add it to Company Config and give the Epicor Service Accounts or All Users Readonly access to the Logo UNC Path.

In SSRS / BarTender its then just about referencing the external image.


However the Key is that you put a fixed dimension for all logo’s if you have MC. Make each one fit in lets say a 500 x 311 box, don’t vary in dimensions.


For a single company or single-plant, you can just embed… But in a MC company, imagine embedding 20 images :slight_smile:

1 Like

Yes, it does not scale!!! :rofl: I think Fred has one company and multiple sites so the same logic but on the plant table would work.

Plus Marketing keeps updating the logos :smiley: so we just swap out the files and viola!

1 Like

Some old screenshots I have laying around… 500 x 311 on disk dimensions.
image
image
image

@Mark_Wonsil Good description.
Do you really need the expression for MIME Type? I just tested on SQL 2016 and it appears I can select any mime type and the image still appears.

1 Like

Good question. I know you need A MIME Type so maybe the expression is not neccessary!

I just use

Without the MIME Type, I always get a broken image. :thinking: At least for the SQL 2017 Report Builder…

I am going to assume that you are using the ImageStore and I think for that you need to use MIME/Type if I recall, because it just throws a MemoryStream or Base64 at SSRS and by selecting a mime/type it knows how to decode it?

1 Like

Pulling directly from Ice.Filestore.Content I tried all the MIME Types and they all worked. Using the correct type sounds better, so I’ll start doing that.

1 Like

FWIW - The base ARForm uses an image from the dataset, and the MIME Type expression is:

=First(Fields!LogoMimeType.Value, "ReportImages")

So it looks like the MIME Type is (or can be) in the dataset.

3 Likes

So is the path is the path of the image on the server? Does this mean I have to upload my images to the server outside of Epicor?

I ended up just embedding all of the logos and writing an IIF statement to choose the right image. Not pretty but it runs a lot faster than the FileStore JOIN.