# Auto Generate/Save Report PDF

**URL:** <https://www.epiusers.help/t/auto-generate-save-report-pdf/61874>\
**Category:** Epicor ERP 10\
**Tags:** reports, ssrs\
**Created:** [November 15, 2019, 1:47am UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874 "2019-11-15T01:47:45Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![chaddb](https://www.epiusers.help/user_avatar/www.epiusers.help/chaddb/32/89855_2.png) [@chaddb](https://www.epiusers.help/u/chaddb)\
**Post date:** [November 15, 2019, 1:47am UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/1 "2019-11-15T01:47:45Z")

</div>

Looking for a way to have a report generated as a PDF and saved to a network share when a field value changes. I can see with a BPM where I could run a report when a field value changes. But can’t find a way to save the PDF to a network share or local file share. Could use the REST API if that’s a way to do it. But don’t see a way with the API to do this either.

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [November 15, 2019, 2:03am UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/2 "2019-11-15T02:03:22Z")

</div>

> [@Trigger ARInvoice Generation from API - not totally getting it](https://www.epiusers.help/t/trigger-arinvoice-generation-from-api-not-totally-getting-it/61559/9):
>
> I sound like a broken record but I use a UBAQ. UBAQ UBAQ UBAQ UBAQ why fiddle with all this stuff when you don’t have to. In 10.2.500 change UBAQ to Func but same concept Simply write a BAQ which takes in a Parameter (Invoice Number?) Then in the UBAQ Post Processing on GetList() you can do this foreach(var x in ttResults) { using (var ar = Ice.Assemblies.ServiceRenderer.GetService\<Erp.Contracts.ARInvFormSvcContract\>(Db)) { ARInvFormTableset ARts = null; ARts =ar.GetNewParameters();…

---

<div class="post-metadata">

**Author:** ![chaddb](https://www.epiusers.help/user_avatar/www.epiusers.help/chaddb/32/89855_2.png) [@chaddb](https://www.epiusers.help/u/chaddb)\
**Post date:** [November 15, 2019, 2:08am UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/3 "2019-11-15T02:08:19Z")

</div>

I would need a program to take the output and convert it to a PDF and save it, correct? At least that’s what I got out of that before I posted this.

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [November 15, 2019, 2:31am UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/4 "2019-11-15T02:31:37Z")

</div>

Nope. SSRS will create the PDF at the server. You just need to pull down the bytes like the System Monitor does.

---

<div class="post-metadata">

**Author:** ![chaddb](https://www.epiusers.help/user_avatar/www.epiusers.help/chaddb/32/89855_2.png) [@chaddb](https://www.epiusers.help/u/chaddb)\
**Post date:** [November 15, 2019, 2:33am UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/5 "2019-11-15T02:33:40Z")

</div>

Where is the file saved to though?

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [November 15, 2019, 11:15am UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/6 "2019-11-15T11:15:14Z")

</div>

The Report Database. Here’s a trace of how Epicor retrieves it.

> [@Downloading SO Acknowledgement pdf programatically](https://www.epiusers.help/t/downloading-so-acknowledgement-pdf-programatically/60350/14):
>
> A trace reveals this order: Poll with this command: \<businessObject\>Ice.Proxy.BO.ReportMonitorImpl\</businessObject\> \<methodName\>GetRowsKeepIdleTimeWithBallonInfo\</methodName\> ... \<parameter name="whereClauseSysRptLst" type="System.String"\>\<![CDATA[((PrintDriver='TEXT' AND (AutoAction='PRINT' OR AutoAction='PREVIEW')) OR (PrintDriver='CRYSTAL' AND (AutoAction='PRINT' OR AutoAction='AUTOPRT' OR AutoAction='PREVIEW' OR AutoAction='AUTOPRV')) OR (PrintDriver='EPIFIN' AND (AutoAction='PRINT…

---

<div class="post-metadata">

**Author:** ![Rich](https://www.epiusers.help/letter_avatar_proxy/v4/letter/r/35a633/32.png) [@Rich](https://www.epiusers.help/u/Rich)\
**Post date:** [November 15, 2019, 9:18pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/7 "2019-11-15T21:18:40Z")

</div>

Chadd -

Have a look at this posting for how to have the Reporting system write out to the File System. At the moment this is limited to writing out to the EpicorData directory but you can create a Share to your defined output location from within EpicorData.

> [@Transfer Reports to Folder](https://www.epiusers.help/t/transfer-reports-to-folder/46004):
>
> I am having a serious brain fart! How, in Epicor 10, can I run a report and put that report to a folder in Excel for users without manual intervention? I want Epicor to put the report in a shared folder. Do I have to use something like BI, Doc-Star? Suggestions are very much welcome. Thank you!!

---

<div class="post-metadata">

**Author:** ![chaddb](https://www.epiusers.help/user_avatar/www.epiusers.help/chaddb/32/89855_2.png) [@chaddb](https://www.epiusers.help/u/chaddb)\
**Post date:** [November 18, 2019, 2:48pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/8 "2019-11-18T14:48:23Z")

</div>

I’ll take a look at this. Thanks!

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [November 18, 2019, 3:45pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/9 "2019-11-18T15:45:49Z")

</div>

I’m trying to reduce the blast area of malware so I recommend against file shares at our company unless absolutely necessary. YMMV. I’m working on a PowerShell script that acts like the Report Monitor and places the document directly into SharePoint with meta data attached and optionally linking the document to multiple Epicor records. It will work on prem as well as in the cloud.

---

<div class="post-metadata">

**Author:** ![chaddb](https://www.epiusers.help/user_avatar/www.epiusers.help/chaddb/32/89855_2.png) [@chaddb](https://www.epiusers.help/u/chaddb)\
**Post date:** [November 18, 2019, 3:48pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/10 "2019-11-18T15:48:54Z")

</div>

Rich - I keep getting the error ‘Unauthorized server path.’

I have tried both the local and network share path for the EpicorData directory. What should the Report Options be for this to work?

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [November 18, 2019, 3:52pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/11 "2019-11-18T15:52:51Z")

</div>

As Rich mentioned in his post, you have to give write access to the App Server user for that share.

> [@Transfer Reports to Folder](https://www.epiusers.help/t/transfer-reports-to-folder/46004/5):
>
> The Path is relative to the AppServer handling the Report generation. Unless you are using the redirects on the System Agent, this will be the AppServer the Task Agent is running against. It is the AppPool User Identity for that AppServer that needs to be able to access the Path or Share you specify after the “File:”

---

<div class="post-metadata">

**Author:** ![chaddb](https://www.epiusers.help/user_avatar/www.epiusers.help/chaddb/32/89855_2.png) [@chaddb](https://www.epiusers.help/u/chaddb)\
**Post date:** [November 18, 2019, 3:59pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/12 "2019-11-18T15:59:06Z")

</div>

The service account user has full access to the share.

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [November 18, 2019, 4:01pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/13 "2019-11-18T16:01:54Z")

</div>

And you’re using a fully-qualified name to the share and not a mapped drive letter?

---

<div class="post-metadata">

**Author:** ![chaddb](https://www.epiusers.help/user_avatar/www.epiusers.help/chaddb/32/89855_2.png) [@chaddb](https://www.epiusers.help/u/chaddb)\
**Post date:** [November 18, 2019, 4:08pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/14 "2019-11-18T16:08:22Z")

</div>

Not the FQ name as it’s too long.

`File:\\erp-apps1\EpicorData\Reports\{ReportID}.pdf`

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [November 18, 2019, 4:13pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/15 "2019-11-18T16:13:26Z")

</div>

Try leaving off the

```auto
\erp-apps1\EpicorData\Reports 

```

and see where it lands. It is relative to the Task Agent folder. If that doesn’t work, add

```auto
Reports\

```

back in.

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [November 18, 2019, 4:16pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/16 "2019-11-18T16:16:19Z")

</div>

Wait, I went back to Rich’s post and he added this:

> [@Transfer Reports to Folder](https://www.epiusers.help/t/transfer-reports-to-folder/46004/11):
>
> Aaron - I was looking at this with Support two weeks ago and what they told you is unfortunately correct. It looks to me like one of our Server Hardening sweeps tagged this as an issue and the code was changed to only allow the file to be written relative to the User ID folder under the Server Data Directory specified on System Agent Maintenance. Totally negates one of the use cases it was added for which is to write to “Fiery Hot” folders. I will raise the issue for review.

---

<div class="post-metadata">

**Author:** ![chaddb](https://www.epiusers.help/user_avatar/www.epiusers.help/chaddb/32/89855_2.png) [@chaddb](https://www.epiusers.help/u/chaddb)\
**Post date:** [November 18, 2019, 6:38pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/17 "2019-11-18T18:38:49Z")

</div>

I read that but read it as we could still write to the ERPData directory.

---

<div class="post-metadata">

**Author:** ![Mark\_Wonsil](https://www.epiusers.help/user_avatar/www.epiusers.help/mark_wonsil/32/51594_2.png) [@Mark\_Wonsil](https://www.epiusers.help/u/Mark_Wonsil)\
**Post date:** [November 18, 2019, 7:02pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/18 "2019-11-18T19:02:18Z")

</div>

I think I understand why Epicor may have changed this behavior. If you’re printing sensitive data, you have to manage folder security by yourself. If they put it in the user directory then you could at least add user security to that folder to keep unauthorized users from viewing sensitive reports. I believe that by going through the business objects, report security is enforced because you have to login and own the report or be Security Manager.

So I would hazard a guess that the place the report will appear is under

```auto
reports\%username%

```

Your goal is to get it to a folder but picking the folder might be a stretch goal that you may not be able to reach.

---

<div class="post-metadata">

**Author:** ![chaddb](https://www.epiusers.help/user_avatar/www.epiusers.help/chaddb/32/89855_2.png) [@chaddb](https://www.epiusers.help/u/chaddb)\
**Post date:** [November 18, 2019, 8:10pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/19 "2019-11-18T20:10:10Z")

</div>

I can’t get that to work either. Seems Epicor has completely removed this functionality.

---

<div class="post-metadata">

**Author:** ![Aaron\_Moreng](https://www.epiusers.help/user_avatar/www.epiusers.help/aaron_moreng/32/745_2.png) [@Aaron\_Moreng](https://www.epiusers.help/u/Aaron_Moreng)\
**Post date:** [November 18, 2019, 10:17pm UTC](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874/20 "2019-11-18T22:17:43Z")

</div>

What does your report style look like in the Options field? If you put File:{yourOptionValue}.{yourExtention} it should put in in the server (where the Task Agent is running, I believe).

Report Style:

 ![image](https://epiusers.help/uploads/default/original/3X/a/3/a33187dfb1f32b1f0a4f1afded3d4a88e1306324.png)

Network Location of App Sever\EpicorData\Reports{UserWhoSubmittedIt}

 ![image](https://epiusers.help/uploads/default/original/3X/1/6/1681fbd6ff51fda187916eb9f1d0e41468bbace2.png)

[Next page](https://www.epiusers.help/t/auto-generate-save-report-pdf/61874.md?page=2)
