Is it possible to use the Add Docstar attachment with a BAQReport?

I use the add docstar function all the time with most RD Reports and it works seemlessly. But I can’t seem to get it to work with BAQ reports. I always get an error.

Is it possible? If so does anyone have a working example they could show

I would suspect that you are missing some of the key pieces of data for the ‘addattachment’ process to work. The widget is looking for a dataset to work from, like when you do this from Quotes or Sales Orders, there is a QuoteHed or OrderHed record set which the system uses to get the associated data like SysRowID in order to do the API call to ECM.

1 Like

Im using the exact same set up as we use with RD Reports

which as an example is using
BAQReportResult records to add to the orderhed table (+docstar type) using key fields with the order number as the value.

Like I say using report def works fine - as soon as you convert to baq reporting the add docstar attachment fails to work

I did a quick mock-up (but not fully tested) and I see where you are with this. At this point I’d open an EpicCare ticket and have them tell you if there are limitations. I’d really like to know myself as I never thought of adding BAQ report results as attachments, but I can see where Id’ like to do that on a few things now. Please post back here if you find an answer and if I get some time to test this, I’ll let you know what I find.

I’ve tried a simple test of an SSRS report being attached based on the first row of the BAQResultSet and I consistently get the following error (but not an error)

With the following detail (non-detail really)

Not sure how to proceed… Is this what you are getting as well?

Is SSRSEnableRouting enabled?

yeah - the checkbox on the Printing dialog box is checked and it asks “Routing rules are enabled, do you wish to run them?” and I say Yes :slight_smile:

Exactly. I may have several other routes for the report (emailing, printing etc) everything else will be fine but the attachment always shows an error in baqreports.

Have you opened a ticket yet?

**EDIT - I’ve opened ticket CS0003853367

1 Like

ok - so I got this working with some help from Epicor Support - sort of. Their comment was that BAQReports act differently according to Dev, but it should work.

Managed to get a BAQReport to render in SSRS and attach to the company table, but the thing is that the Add Attachment widget doesn’t work with SysRowID GUIDs (there is a conversion issue from GUID to text in the REST call) so it needs the actual value of the “Key Fields”. Plus, it doesn’t allow you to choose the “key fields” when using the Company table.

In my case I had to add the company table, and the company_comapny column to the BAQ itself, even though the report doesn’t even need it. It wouldn’t take the company field from the transaction table. The Add Attachment wizard then magically worked, without specifying that field as the Key Field for the widget.

I would start with adding the table to the query (that you want to attach the document to) and adding whatever fields make the Key. E.g. SalesOrder attachments would require the orderhed, orderdtl, or orderrel tables with the columns of company, ordernum | orderline | orderrel added to the query.

That is interesting. I’ve done what you suggested but still get the error. However in the BAQ there are sub-queries. therefore I had to add the company to the upper level BAQ. it does show in the APR BPM screen, but doesn’t seem to have an effect :(.
BTW I guess your in the states - therefore get a response from support? The UK (now mostly eastern european) support is utter pants! I’ve still heard nothing.

Start simple and prove that it works with a simple query like I did. (I ran a BAQ report with two tables - company and CurrExchRate. No Subqueries or CTE’s and such.)

If it doesn’t work, let’s look at what you have for settings.