Below I will post the input parameter for the SERVER/api/v1/Erp.RPT.PackingSlipPrintSvc/RunDirect method and then what I am passing… If anyone has any idea why it doesn’t run please let me know.
I tried to follow @Mark_Wonsil 's post here: Running Reports from REST - #3 by bradberkobien
Here is the parameter the run direct method is looking for
{
"ds": {
"PackingSlipParam": [
{
"PackNum": 0,
"PrintingOptions": "string",
"AssignLegalNumber": true,
"EnableAssignLegalNumber": true,
"DCHdrList": "string",
"PackNumList": "string",
"StyleNumExt": 0,
"EnableIncludePCID": true,
"IncludePCID": true,
"DocCopyNum": "string",
"DraftMode": true,
"SysRowID": "00000000-0000-0000-0000-000000000000",
"AutoAction": "string",
"PrinterName": "string",
"AgentSchedNum": "0",
"AgentID": "string",
"AgentTaskNum": 0,
"RecurringTask": true,
"RptPageSettings": "string",
"RptPrinterSettings": "string",
"RptVersion": "string",
"ReportStyleNum": 0,
"WorkstationID": "string",
"TaskNote": "string",
"ArchiveCode": 0,
"DateFormat": "string",
"NumericFormat": "string",
"AgentCompareString": "string",
"ProcessID": "string",
"ProcessCompany": "string",
"ProcessSystemCode": "string",
"ProcessTaskNum": 0,
"DecimalsGeneral": 0,
"DecimalsCost": 0,
"DecimalsPrice": 0,
"GlbDecimalsGeneral": 0,
"GlbDecimalsCost": 0,
"GlbDecimalsPrice": 0,
"FaxSubject": "string",
"FaxTo": "string",
"FaxNumber": "string",
"EMailTo": "string",
"EMailCC": "string",
"EMailBCC": "string",
"EMailBody": "string",
"AttachmentType": "string",
"ReportCurrencyCode": "string",
"ReportCultureCode": "string",
"SSRSRenderFormat": "string",
"UIXml": "string",
"PrintReportParameters": true,
"SSRSEnableRouting": true,
"DesignMode": true,
"RowMod": "string"
}
],
"ReportStyle": [
{
"Company": "GRC",
"ReportID": "string",
"StyleNum": 0,
"StyleDescription": "string",
"RptTypeID": "string",
"PrintProgram": "string",
"PrintProgramOptions": "string",
"RptDefID": "string",
"CompanyList": "string",
"ServerNum": 0,
"OutputLocation": "string",
"OutputEDI": "string",
"SystemFlag": true,
"CGCCode": "string",
"SysRevID": "0",
"SysRowID": "00000000-0000-0000-0000-000000000000",
"RptCriteriaSetID": "string",
"RptStructuredOutputDefID": "string",
"StructuredOutputEnabled": true,
"RequireSubmissionID": true,
"AllowResetAfterSubmit": true,
"HasBAQOrEI": true,
"BitFlag": 0,
"ReportRptDescription": "string",
"RptDefRptDescription": "string",
"RptTypeRptTypeDescription": "string",
"RowMod": "string"
}
],
"ExtensionTables": [
{
"Table": [
{
"ColumnValues": [
{}
],
"RowMod": "string",
"SysRowID": "00000000-0000-0000-0000-000000000000"
}
],
"SystemCode": "string",
"TableName": "string",
"Columns": [
{
"ColumnName": "string",
"ColumnType": "string"
}
],
"PrimaryKeyColumns": [
"string"
],
"PeerTableSystemCode": "string",
"PeerTableName": "string"
}
]
}
}
This is what I am supplying, but I get an error: 400 Sorry! Something went wrong. Please contact your system administrator.
My Parameter
{
"ds": {
"PackingSlipParam": [
{
"PackNum": 0,
"PrintingOptions": "S",
"AssignLegalNumber": false,
"EnableAssignLegalNumber": false,
"DCHdrList": "",
"PackNumList": "145107",
"StyleNumExt": 1003,
"EnableIncludePCID": false,
"IncludePCID": false,
"DocCopyNum": "",
"DraftMode": false,
"SysRowID": "00000000-0000-0000-0000-000000000000",
"AutoAction": "SSRSPREVIEW",
"PrinterName": "",
"AgentSchedNum": "0",
"AgentID": "SystemTaskAgent",
"AgentTaskNum": 0,
"RecurringTask": false,
"RptPageSettings": "",
"RptPrinterSettings": "",
"RptVersion": "",
"ReportStyleNum": 1005,
"WorkstationID": "1111111",
"TaskNote": "",
"ArchiveCode": 0,
"DateFormat": "m/d/yyyy",
"NumericFormat": ",.",
"AgentCompareString": "",
"ProcessID": "",
"ProcessCompany": "",
"ProcessSystemCode": "",
"ProcessTaskNum": 0,
"DecimalsGeneral": 0,
"DecimalsCost": 0,
"DecimalsPrice": 0,
"GlbDecimalsGeneral": 0,
"GlbDecimalsCost": 0,
"GlbDecimalsPrice": 0,
"FaxSubject": "",
"FaxTo": "",
"FaxNumber": "",
"EMailTo": "",
"EMailCC": "",
"EMailBCC": "",
"EMailBody": "",
"AttachmentType": "",
"ReportCurrencyCode": "USD",
"ReportCultureCode": "en-US",
"SSRSRenderFormat": "PDF",
"UIXml": "",
"PrintReportParameters": false,
"SSRSEnableRouting": false,
"DesignMode": false,
"RowMod": "A"
}
],
"ReportStyle": [
{
"Company": "GRC",
"ReportID": "PackSlip",
"StyleNum": 1005,
"StyleDescription": "Standard - SSRS - Copy",
"RptTypeID": "SSRS",
"PrintProgram": "Reports/CustomReports/GRC-PackingSlip/PackSlip4X6",
"PrintProgramOptions": "",
"RptDefID": "PackSlipGRC",
"CompanyList": "",
"ServerNum": 0,
"OutputLocation": "Database",
"OutputEDI": "",
"SystemFlag": false,
"CGCCode": "",
"SysRevID": "0",
"SysRowID": "00000000-0000-0000-0000-000000000000",
"RptCriteriaSetID": "null",
"RptStructuredOutputDefID": "null",
"StructuredOutputEnabled": false,
"RequireSubmissionID": false,
"AllowResetAfterSubmit": false,
"HasBAQOrEI": false,
"BitFlag": 0,
"ReportRptDescription": "",
"RptDefRptDescription": "",
"RptTypeRptTypeDescription": "",
"RowMod": ""
}
],
"ExtensionTables": [
{
"Table": [
{
"ColumnValues": [
{}
],
"RowMod": "",
"SysRowID": "00000000-0000-0000-0000-000000000000"
}
],
"SystemCode": "",
"TableName": "",
"Columns": [
{
"ColumnName": "",
"ColumnType": ""
}
],
"PrimaryKeyColumns": [
""
],
"PeerTableSystemCode": "",
"PeerTableName": ""
}
]
}
}