Printing UserID on SSRS reports

I’m trying to find a way to pass the current user ID to be printed on a canned SSRS report (not BAQ Reports). It can be Sales Order Acknowledgement. I looked at RDD, report parameters and various tables E10 creates but nothing seems to hold the UserID that submitted the report. Any ideas?

Thanks

This post outlines a way to do it:

The userID is another field on the CallContextClientData temp table that gets generated when the report is run. “CurrentUserId”

1 Like

Hi Adam, thank you for the reply. It’s exactly what I was looking for, except that when I tried to bring the CallContextClientData table into the report I get an error. I do not see that temp table in the database either. Is this a feature beginning with certain version? I’m on 10.0.700.4.

Program Ice.Services.Lib.RunTask raised an unexpected exception with the following message: RunTask: An error has occurred during report processing. —> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. —> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Query execution failed for dataset ‘DataSet1’. —> System.Data.SqlClient.SqlException: Invalid object name ‘CallContextClientData_51af3b26248c4fc7915d22c164517242’.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at Ice.Core.SsrsReportService.ReportExecutionService.Render(String Format, String DeviceInfo, String& Extension, String& MimeType, String& Encoding, Warning[]& Warnings, String[]& StreamIds)

Wondering what did your modified expression end up looking like?
The values below worked on version 10.1.6 - note I joined on T2.Company.

T5.CurrentUserId

LEFT OUTER JOIN CallContextClientData_" + Parameters!TableGuid.Value + " T5
ON T2.Company = T5.CurrentCompany"

Really? I just created a new DataSet and set the query as this to test to see if a data will come into the report.

=“SELECT T1.CurrentPlant FROM CallContextClientData_” + Parameters!TableGuid.Value + " T1"

In the Epicor10Reports database I have never seen a table named “CallContextClientData_…” created.

Fred

Yeah one of those things. Not displayed - you just have to know.
I just happened to see a couple threads, referenced here:

  • never noticed any mention in the standard documentation but… could be in there?

CallContextClientData_ and CallContextBpmData_

e.g.
LEFT OUTER JOIN CallContextClientData_" + Parameters!TableGuid.Value + " T2
ON T1.Company = T2.CurrentCompany"

Or
LEFT OUTER JOIN CallContextBpmData_” + Parameters!TableGuid.Value + " T3 ON T1.whatever = T3.whatever"

When you run the report, have you tried setting the Archive Period to anything but 0 days? That should leave the temp table visible in the AppServerNameReports database. But it very well may be a later version feature… Just to confirm, did you change the datasource to the one the report uses on your new dataset?

I concluded this feature is not available in my version. I tested with 10.2.300 and verified that both CallContextBpmData and CallContextClientData tables are created.

Thanks

@Asz0ka
I need to print data from CallContextClientData_ as well so I was hopeful this would work, but it doesn’t in 10.2.600 (Cloud).
What is interesting is the CallContextClientData_ tables are valid in the DataSource but it does not appear to have any data. I created the CallContextClientData DataSet and entered a query that should return the values and setup the fields. But when I put them on the report I no values are returned.
If the tables did not exist in the DataSource I should have rec’d an error about a DataSet failing, but I didn’t, so the tables are there but they do not contain any data.
I wonder if this is a bug or something Epicor is no longer supporting.

It is still supported but not all the CallContext fields are being set when the Kinetic version of the submission Form is used. The issue has been submitted to Dev under story ERPS-144817 and will be accepted for resolution.

If you want the Windows User ID you can include a text field with this expression =mid(User!UserID , InStr(User!UserID,"")+1)

Would that print the user that rendered the report, and not the user that generated it?

Like if user A generated the report and archived it, then user B printed that archived report, it would say user B. No?

The ERP SSRS are generated and then stored on the Server as a completed document. The Epicor User ID that submitted the report is in play during the generation but the Windows User during the actual report gen will be the User Assigned to the AppServer Service. If you want the Windows User ID (and you are using the Smart Client Submission UI) you can pass that information in one of the BPMData fields.

There is no logic executed when a report is printed so the user doing the printing would not be included on the report output.

Really?

Where? As a file on the server, or as a record in the DB?

There was a post about it last week if I recall: