Hi guys i have the code below running on a dashboard. I have the similar code for print preview where AutoAction = “printpreview” and it works, but AutoAction = “print” command it is generating this error in the task agent “Expected AutoAction to be either print, preview or generate”. Also i tried AutoAction = “SSRSClientPrint” and is not printing either. please help
private void PrintInv(string invoicenum)
{
// Provide print dialog support
ARInvFormDataSet ds = new ARInvFormDataSet();
var session = this.oTrans.CoreSession;
ds = boARInvForm.GetNewParameters();
boARInvForm.GetRptArchiveList();
boARInvForm.GetDefaults(ds);
// Params that need setting
ds.ARInvFormParam[0].InvoiceNum = Convert.ToInt32(invoicenum);
ds.ARInvFormParam[0].AutoAction = "PRINT";
ds.ARInvFormParam[0].AgentSchedNum = 0;
ds.ARInvFormParam[0].AgentID = "SystemTaskAgent";
ds.ARInvFormParam[0].RecurringTask = false;
ds.ARInvFormParam[0].DateFormat = "m/d/yyyy";
ds.ARInvFormParam[0].NumericFormat = ",.";
ds.ARInvFormParam[0].ReportStyleNum = 1009;
ds.ARInvFormParam[0].WorkstationID = Ice.Lib.Report.EpiReportFunctions.GetWorkStationID(session);
ds.ARInvFormParam[0].ReportCultureCode = Ice.Lib.Report.EpiReportFunctions.GetRptCultureCode(session);
ds.ARInvFormParam[0].ReportCurrencyCode = Ice.Lib.Report.EpiReportFunctions.GetRptCurrencyCode(ds.Tables[0].Rows[0]["ReportCultureCode"].ToString(), session);
ds.ARInvFormParam[0].SSRSRenderFormat = "PDF";
ds.ARInvFormParam[0].SSRSEnableRouting = false;
boARInvForm.SubmitToAgent(ds, "SystemTaskAgent", 0, 0, "Erp.UIRpt.ARInvForm;" + "ARForm");
}