SOPick Pick List, AutoPrint, Report Filter Lists

I’ve created a Data Directive against a UD table that when an Order number is added to the UD table, the order’s pick list is Autoprinted. To accompany a web app dashboard for our shipping department:

If I go into the SOPick report and run the report manually (entering the dates and order number into the form), the report generates correctly.

When I do the same with AutoPrint, nothing happens and in the server log, I see a ‘no records selected’ error.

{AB2C6960-9F22-430E-9578-BCADAC409E89}

If I leave the OrderList field empty, the AutoPrint works and I get a report printed, but of course gives me all the orders in the date range.

Here is my report parameters screen

I assume that I must be entering the OrderList in an incorrect format. But everything else I’ve tried gives me an error on the server of “The input string ‘[173170]’ was not in a correct format.”

I eventually will replace the constant order number with the one tapped from the dashboard, but if I can’t even get a static one to autoprint…

Has anyone had a similar issue with AutoPrint and a filter like this?

Did you try putting 173170 in double quotes?

  • Constant: “173170” gives me a compilation error
  • Constant: \“173170\” gives me “The input string ‘“173170”’ was not in a correct format.”
  • Constant: ‘173170’ gives a compilation error

Can you specify an expression there? Maybe try to use a convert(nvarchar, 173170) or something to that effect.

rather than a constant 173170

I tried

Expression: 173170.ToString() - No records selected
Expression: “173170” - No records selected

Could someone else try this? Set up an autoprint for the SOPick report for a single Order? can you get it to work?

did you try creating an array and putting a single order in the array? If it’s expecting a list, it may be looking for an array object instead of a text or number.

1 Like

[‘173060’] was not in a correct format.
["173060"] fails quietly

Try putting a ~ after the number all encased in double quotes

1 Like

"173172~" fails silently
173172~ gives the error : The input string ‘’ was not in a correct format. Which is odd because it thinks the string constant is empty.

There are several issues that were contributing to this problem. I redid the Autoprint call with code and got it to print (or at least send it as an email). I am going to open another thread about the remaining issues.

CallService<Erp.Contracts.SOPickListReportSvcContract>(sop => {
    var param = sop.GetNewParameters();
    var paramR = param.SOPickListReportParam.FirstOrDefault(x => x.RowMod.Equals("A"));

    paramR.OrderList = OrderNum.ToString();
    paramR.FromDate =  new DateTime(2023,01,01);
    paramR.FromDateToken = "";
    paramR.ToDate=  new DateTime(2035,01,01);
    paramR.ToDateToken= "";
    paramR.PartList= "";
    paramR.NewPage= true;
    paramR.BarCodes= true;
    paramR.PrintKitComponents= true;
    paramR.IncSOWihoutShipDate= true;
    paramR.PrintAttributes= false;
    paramR.SysRowID = new Guid("00000000-0000-0000-0000-000000000000");
    paramR.AutoAction= "SSRSPrint";
    paramR.PrinterName= "";
    paramR.AgentSchedNum= 0;
    paramR.AgentID= "";
    paramR.AgentTaskNum= 0;
    paramR.RecurringTask= false;
    paramR.RptPageSettings= "";
    paramR.RptPrinterSettings= "";
    paramR.RptVersion= "";
    paramR.ReportStyleNum= 1002;
    paramR.WorkstationID= "";
    paramR.TaskNote= "";
    paramR.ArchiveCode= 0;
    paramR.DateFormat= "m/d/yyyy";
    paramR.NumericFormat= ",.";
    paramR.AgentCompareString= "";
    paramR.ProcessID= "";
    paramR.ProcessCompany= "";
    paramR.ProcessSystemCode = "";
    paramR.ProcessTaskNum= 0;
    paramR.DecimalsGeneral= 0;
    paramR.DecimalsCost= 0;
    paramR.DecimalsPrice= 0;
    paramR.GlbDecimalsGeneral= 0;
    paramR.GlbDecimalsCost= 0;
    paramR.GlbDecimalsPrice= 0;
    paramR.FaxSubject= "";
    paramR.FaxTo= "";
    paramR.FaxNumber= "";
    paramR.EMailTo= "me@myemail.com";
    paramR.EMailCC= "";
    paramR.EMailBCC= "";
    paramR.EMailBody= "test";
    paramR.AttachmentType= "PDF";
    paramR.ReportCurrencyCode= "USD";
    paramR.ReportCultureCode= "en-US";
    paramR.SSRSRenderFormat= "PDF";
    paramR.UIXml= "";
    paramR.PrintReportParameters= false;
    paramR.SSRSEnableRouting= false;
    paramR.DesignMode= false;
    paramR.RowMod= "A";
    paramR.PrinterName = "";
    
    sop.SubmitToAgent(param, "", 0, 0,"Erp.UIRpt.SOPickListReport");    
    
    
});