Print Attachment on Quote

Trying to print an attachment associated with a quote on the print form.

  1. Setup attachments to be stored in our SharePoint site.
  2. Saved attachment within quote header.
  3. Wrote little baq to pull xfileref.filename.
    Where quotehed.quotenum=xfileattch.key1 and xfileattch.xfilerefnum=xfileref.xfilerefnum
  4. Put the xfileref.filename in browser and was able to view the image

*** Starts to get rocky ***
5. Add external image to my SSRS report in Report Builder. Image does not appear.

Question. Is what I am trying to do possible, and if so am I barking up the right tree?

It appears to me I can’t associate my sharepoint account with the Epicor/SSRS report service.

Any help, as always, will be greatly appreciated.

Referencing a image is a tough one, although it should work for some reason I have had issues in the past. The only way I was able to reference an image was to make sure the image(s) existed in the same folder as the report, not very efficient or generic. I was able to however store part images in the filestore table and extract them during job traveler prints from the Database. I created a view in the Reporting DB that referenced the filestore table in the app db and grabbed that on the fly…

Does the path to the image file use only globally referenced values? If the path to the image file specified a drive letter (like “E:\images\image001.jpg”), then the report renderer on the server might see that drive, while the workstation wouldn’t (it doesn’t have an “E:” drive, or if it does, it’s not the same “E:” drive)

If you’re using shared resources like

\\SQLSrv01\e$\E10\images is shared as images, then \\SQLSrv01\images looks the same to everyone* regardless of their frame of reference.
*assuming share security is properly setup.

The SQL server could see the file E:\E10\images\image001.jpg.
The AppServer and client could not. But they could see \\SQLSrv01\images\image001.jpg (as could the
SQL server)

I’d like to think that a sharepoint resource would automatically handle this. But something to think about.

Thanks for the insight.
We are on the Public Cloud so I don’t think that would be an option for us.

We have setup a SharePoint site to store our attachments. The url to the file is stored as XFileName in the XFileRef table. When I am logged into our sharepoint site(on Office 365) I can view the image by pasting the XFileName in the address bar. I just get a red X on my ssrs report though. I suspect the account/service processing the SSRS report doesn’t have permissions to the sharepoint site. Do you know what account the report is processed as?

This is most likely it. And no I don’t know which “user account” requests the sharepoint file.

I’m not sure it’s possible Mark. However, let’s imagine a company that wants to maximize the use of O365, err, I mean M365 and Epicor. Let’s call it ME365…

In this world, one would like to use Azure AD to log into both systems to get the added protection of Multi-Factor Authentication and ease of user maintenance for the IT team. One would also want to use all the benefits of SharePoint having multiple Document Libraries from various Teams, custom columns, data retention policies, etc.

The SharePoint add-on for E10 dictates the library structure so, as you may have already found, the best way to do attachments is by using the URI of the document. Except, the add-on doesn’t work with Azure AD at this time. You still need to give your network username and password to authenticate to SharePoint. :thinking:

So, like you, we wanted to print a quote. But for systems in the hundreds of thousands of USD, we really didn’t want to put that on an SSRS report. We wanted something a little more…“rich” I believe is term. One of the last active projects I was working on was a Word Add-In. This is different from previous add-ins like Information Worker. It’s all TypeScript that runs on a server and not in the documents because Microsoft wants Add-Ins to be able to run in Word on the desktop as well as the Cloud. From a Word template for a Quote, I could have the Add-In use REST to pull in data from Epicor and then use standard Fields to replace the content. Whatever I can do in Word is now possible, including nicely formatted text, clean tables, and even pictures from SharePoint.

Once the document is created, I would save it in SharePoint and then use a SharePoint event which could call a REST endpoint to create the attachment in Epicor - even attaching to multiple Epicor objects at once! So maybe you might be able to do something similar? Being in the Cloud sometimes means finding different, and maybe better, ways to do things.

ME365 was a possible Insights Topic I’ve had for a year or so. Maybe next year… :wink:

Mark W.


I have done this on a quote for repairs, where a photo is taken of the damage and attached to the quote form.

I created a customization that allowed an image to be added to Epicor and populated the file name in a UD field.

Unfortunately, I didn’t find any way of getting the data to appear in the report table to query direct, so I have to doctor the SQL to display the image.

On the report I added the following clause to the SQL -

*select content from f, ud, u *
where u.sysrowid = ud.foreignsysrowid and f.filename = ud.RepairPicture2_c and t2.dsermaid_c = u.key1 and t2.serialnumber_c = u.key2 and ud.RepairPicture1_c != ‘’ filecontent

I then added an image to the report can set the values as per the image below:


I appreciate this isn’t the most elegant solution, but it does work.

Does this work for SaaS too?

Sorry Mark, I can’t say for sure, but if you can edit the RDL’s in a SAAS environment and create customizations, I cannot see why not, as SRRS is doing all the rendering.

No doubt about the rendering. It’s reaching back into the actual E10 database as I assume SaaS users only have access to the SSRS database. Worth a try…

I understand what your saying - would be interested in how things go

That 's pretty slick. Thanks for sharing. Again we are SaaS so I don’t know all the limitations. This has been my direction.

  1. Save the image in the Qoute/Oppurtunity Actions->Attachments. That saves the file in our SharePoint site. A reference(url in this instance) is created in XFileRef.XFileName.

  2. I added XFileAttch & XFileRef to my Report DD.

  3. Query in RDL is:=“SELECT T3.XFILENAME
    FROM QuoteHed_” + Parameters!TableGuid.Value + " T1
    LEFT OUTER JOIN XFileAttch_" + Parameters!TableGuid.Value + " T2
    ON T1.Company = T2.Company AND T1.QuoteNum = T2.KEY1
    LEFT OUTER JOIN XFileRef_" + Parameters!TableGuid.Value + " T3
    ON T2.XFileRefNum = T3.XFileRefNum"

  4. I add an image to my RDL with properties:

  5. All I get when I run the report is the red X

I think my problem is permissions. The account rendering the report doesn’t have access to our SharePoint site. Do you know what account is used for rendering? Thanks

Did you ever get this worked on? We’re working on a similar project now, but our attachments are stored on a local server. Since Epicor has access to that server, I don’t forsee any access issues like Sharepoint. Is there somewhere in the SSRS report you can specify an account to access Sharepoint? Is Epicor using a specific account to access the sharepoint location?


That’s the problem. There is no where to store account information in the rdl. You can supply a http url for the location of the image, but that location cannot require authentication. I got it to work on a open web server but many of our images are ITAR restricted so it was a solution. Hope this helps and cheers !

This info def helps. You said you got it to work on an open web server? So I’m assuming you tried something other than Sharepoint? Stored it on an open webserver using IIS? Web URL? Wonder if that would work and then just use the firewall to lock it down some.


I think it should.

Last question. I set up a new site that is not open outside our network. Does it have to be accessible through the internet?

The attachments work pointing to the new location fine from the app, but still getting red X’s on the SSRS report.


Yes if you are in the cloud. The report is generated on an epicor print server if in the cloud.

That print server would need to be able to access the url without any authentication.

So it doesn’t work the same as attachments? We have attachments saved on the same server and it works fine. Is this because the client runs locally and accesses attachments locally also?

Would assume the SQL/SSRS server is on the same ip range on their end.

Was told by Epicor that it needed to be a secure site, but they did not specify that it needed to be accessible outside the network. I guess it’s because the SSRS reports are not stored locally and thus not triggering locally or able to access my local network?