How to get the WorkstationID in Kinetic client 2024.1.11 for Method BPM report preview

I am pulling my hair out trying to get the code below to work in a method bpm on a Kinetic client. The message I have in my code below displays nothing. It shows the report complete in the system monitor but no report in the Reports tab of the system monitor and no report pops up. I believe that is because it need my WorkstationID to display/preview the report. If I generate only it shows in the Reports tab and I can preview it. Also, when I look at the Workstation for my user profile, it returns, No Data Found.

Please help!

Thanks,
Richard

string workstationid = Session.WorkstationID;
this.PublishInfoMessage(workstationid,Ice.Common.BusinessObjectMessageType.Information, Ice.Bpm.InfoMessageDisplayMode.Individual,"","");
int quoteNum = Convert.ToInt32(callContextBpmData.Number01);
using (Ice.Contracts.DynamicReportSvcContract dynamicReport = Ice.Assemblies.ServiceRenderer.GetService<Ice.Contracts.DynamicReportSvcContract>(Db))
 {
   using( Erp.Contracts.QuotFormSvcContract QuotForm = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.QuotFormSvcContract>(Db) )
   {
     var baqRptDS = QuotForm.GetNewParameters();
     baqRptDS.QuoteFormParam[0].AutoAction = "SSRSPreview";
     baqRptDS.QuoteFormParam[0].AttachmentType = "PDF";
     baqRptDS.QuoteFormParam[0].WorkstationID = workstationid;
     baqRptDS.QuoteFormParam[0].SSRSRenderFormat = "PDF";
     baqRptDS.QuoteFormParam[0].RecurringTask = false;
     baqRptDS.QuoteFormParam[0].SSRSEnableRouting = false;
     baqRptDS.QuoteFormParam[0].ArchiveCode = 0;
     baqRptDS.QuoteFormParam[0].AgentSchedNum = 0;
     baqRptDS.QuoteFormParam[0].AgentID = "System Task Agent";
     baqRptDS.QuoteFormParam[0].ReportStyleNum = 1008;
     baqRptDS.QuoteFormParam[0].AgentTaskNum = 0;
     baqRptDS.QuoteFormParam[0].QuoteNum = quoteNum;
     baqRptDS.QuoteFormParam[0].RowMod = "A";
     QuotForm.SubmitToAgent(baqRptDS, "System Task Agent", 0, 0, "Erp.Rpt.QuotForm;QuotForm");

I’m on E10 and I’m calling SubmitToAgent from a function. I remember having similar issues and removing the line with the WorkstationID did the trick for me. I just commented it out and it started working.

“WorkstationID” is not a workstation id lol…

Use either of these:

baqParams.WorkstationID = Session.TaskClientID;
baqParams.WorkstationID = $"web_{Session.UserID}";

1 Like

Thank you 1 million times Kevin.

Without your very helpfull information, I would be lost and unsuccessful!

You are the best!

Richard

1 Like