Printing error from Importing Orders

Epicor created an import for us to import Orders via spreadsheet. I then created a BPM which would take the orders and send them to be printed automatically. The prints show up in the system Monitor but do not print. The first print gives the following error:

An error occurred while performing print routing action Client Print:
System.Web.Services.Protocols.SoapException: The Variable(Initialize) expression for the report ‘body’ contains an error: Item has already been added. Key in dictionary: ‘OrderNum’ Key being added: ‘OrderNum’
at Microsoft.ReportingServices.Library.ReportExecution2005Impl.InternalRender(String Format, String DeviceInfo, PageCountMode pageCountMode, Stream& Result, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)
at Microsoft.ReportingServices.Library.ReportExecution2005Impl.Render(String Format, String DeviceInfo, PageCountMode pageCountMode, Byte[]& Result, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)
at Microsoft.ReportingServices.WebServer.ReportExecutionService.Render(String Format, String DeviceInfo, Byte[]& Result, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)

Does it work printing manually? I would offer that your BPM is not yet setup correctly.

I guess I shoudl give the full breakdown for discussion sake. My apologies for not doing so sooner.

Import Sales Orders–>BPM sends it the APR Routing for OrderAck report Style Well at least it says it is going to do the Routing appropriately. If I shut down the BPM it works. If I shut down the APR, it doesn’t work.

BPM:
The OrderHed.CustNum field is the changed row is equal to 1492. If True, Orderhed.ReadyToFulfill field of the Changed row is equal to true. If True then Automatically Print Orderack with Run Schedule Immediate, To client printer, Print action: AutoPrint (Applying Routing) with rule (Fo rEach Matching).
Print BPM

I would avoid using client printers in BPMs (personally). It creates another layer of confusion. Try adding it as a standard Epicor Printer (easy to do via sharing).

1 Like

Is that the Sever Printer?

Yes.

1 Like

@Jason_Woods It prints, but it prints double! All the settings in the printer are set for one, and nothing in the Epicor side shows 2. I was thinking, maybe during the import the order number gets listed twice somehow?? Anyway, wanted to see if you had any other ideas on what to check before I go back to Epicor and ask for their opinion.

I would offer then, that the SSRS file is not setup correctly. Is it doubling lines or printing 2 Acknowledgements? I hope you did not click “Sync Datasets”…

No, I did not! It is printing two acknowledgments.

Then likely you have a BPM that is firing too often.

1 Like

Which was one reason I was thinking about he import process. I have it set like this:

CustNum of the changed row is equal to 1492. If true, ReadyToFulfill of the changed row is equal to true. If true, auto print.

Any ideas on how to slow it up/stop it? Considering we are importing orders via spreadsheet.

I would say “ReadyToFulfill has been changed from False to True”.

How do you have the Break set in APR? If you are breaking on the wrong table - say a child table to the report - you will get the report duplicated for each child row.

Also - look in the System Monitor. If you see two Sys Mon entries, it is BPM. If you see one Sys Mon entry with 2 reports, it is APR.

Thought the same thing, so I actually disabled the APR and just run it using the BPM. Still duplicating.