Unable to print BAQ Report by REST API

I’m trying to print a Epicor BAQ Report using REST API from another web application. I was able to do similar printing with a standard Epicor Report (a modified Order Ack Report) successfully. When I work on another BAQ Report or even test in Epicor REST API Help page or Postman, the REST API returns a 200 OK Response. However, when I go to the Epicor monitor, the report process shows an error like this:

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 ‘BAQReportParameter’. —> System.Data.SqlClient.SqlException: Invalid column name ‘Cur-TaskClientID’.

I checked in the Report Database, I found that the table dbo.BAQReportParamXXXXXXXXXXX was not created succesfully. I guess this is the reason on the error above. I also wonder if it is a permission problem. But when I use same Epicor account to print the standard Epicor Report through REST API, the other table dbo.RptParameterXXXXXXXX can be created. The account is a security manager in Epicor. Do I need additional permission in the sql server? (I tried also adding the same account with sysadmin rights in the SQL database but it also did not work)

Below is the REST API i used and the dataset I pass in. For the BAQReportParam Filter1, I copied the DynamicReportDataSet from a client trace of printing same report in Epicor.

I have stuck here for a few days and would be much appreciated if someone can offer me some help.

URL: https://{epicor_server}/{epicor_app}/api/v1/Ice.Rpt.BAQReportSvc/SubmitToAgent
“ds”: {
“BAQReportParam”: [
“BAQID”: “TEST_013_SPARInv”,
“SortBy”: “”,
“SortFields”: “”,
“ReportTitle”: “Invoice”,
“Summary”: false,
“Filter1”: “<DynamicReportDataSet xmlns=“http://www.epicor.com/Ice/300/BO/DynamicReport/DynamicReport”>THK01TEST_SPAR_RptTOMY 013 ShipPlan AR Invoice ReportInvoiceTEST_013_SPARInvfalsefalsefalsefalseTEST_SPAR_RptTEST_SPAR_Rpt.rdl27050725c90c4277-be3c-4247-bad8-6d055b61de700THK01TEST_SPAR_RptUD103Key1=1Ship Plan IDUD103_Key1x(50)3751ef05-7f02-4a0b-9324-9f8107226170truenvarcharfalse027050729a3ee0cc6-c9cf-4466-945a-5efbc7d2748b0000000005Field10”,
“UserID”: “annie.cheung”,
“Character01”: “ff2a11eb-106e-41ef-8116-09a078a4738b”,
“ReportID”: “TEST_SPAR_Rpt”,
“Option01”: “0000000005”,
“PrinterName”: “”,
“AgentSchedNum”: 0,
“AgentID”: “SystemTaskAgent”,
“AgentTaskNum”: 0,
“RecurringTask”: false,
“ReportStyleNum”: 1,
“ArchiveCode”: 1,
“FaxSubject”: “ARINV-100002-20200318”,
“ReportCurrencyCode”: “HKD”,
“ReportCultureCode”: “en-HK”,
“SSRSRenderFormat”: “PDF”,
“PrintReportParameters”: false,
“SSRSEnableRouting”: false,
“DesignMode”: false,
“RowMod”: “A”
“ReportStyle”: [],
“ExtensionTables”: []},
“agentID”: “SystemTaskAgent”,
“agentSchedNum”: “0”,
“agentTaskNum”: “0”,
“maintProgram”: “Ice.UIRpt.BAQReport”

Based on the Ice.SysTaskParam schema, there is no column name called Cur-TaskClientID.

Cur-TaskClientID appears to be a field value inside the ParamName column of the table…

select * from [Ice].[SysTaskParam] where ParamName = ‘Cur-TaskClientID’