Print preview with routing from Code

Hi guys i am using the code below to send the acknowledgement via email using routing rules on the report style. the code is failing on ds = so.GetNewParameters(); after looking at the code for hours i cant see what i am missing any idea

private static Erp.Proxy.Rpt.SalesOrderAckImpl so
{
get { return WCFServiceSupport.CreateImpl(oTrans.CoreSession, ImplBase.UriPath); }
}

private static void PrepPrintJob( Session session,  int ordernum)
{
    // Provide print dialog support

    SalesOrderAckDataSet ds = new SalesOrderAckDataSet();
    ds = so.GetNewParameters();
    DynamicReportAdapter dra = new DynamicReportAdapter(oTrans);
    dra.BOConnect();
    dra.GetByID("OrderAck");
    so.GetDefaults(ds);


    // Params that need setting

    ds.SalesOrderAckParam[0].OrderNum = ordernum;
    ds.SalesOrderAckParam[0].AutoAction = "SSRSPREVIEW";
    ds.SalesOrderAckParam[0].AgentSchedNum = 0;
    ds.SalesOrderAckParam[0].AgentID = "SystemAgent";
    ds.SalesOrderAckParam[0].RecurringTask = false;
    ds.SalesOrderAckParam[0].DateFormat = "m/d/yyyy";
    ds.SalesOrderAckParam[0].NumericFormat = ",.";
    ds.SalesOrderAckParam[0].ReportStyleNum = 1004;
    //ds.SalesOrderAckParam[0].Filter1 = dra.DynamicReportData.GetXml();
    // Print Params

    ds.SalesOrderAckParam[0].WorkstationID = Ice.Lib.Report.EpiReportFunctions.GetWorkStationID(session);
    ds.SalesOrderAckParam[0].ReportCultureCode = Ice.Lib.Report.EpiReportFunctions.GetRptCultureCode(session);
    ds.SalesOrderAckParam[0].ReportCurrencyCode = Ice.Lib.Report.EpiReportFunctions.GetRptCurrencyCode(ds.Tables[0].Rows[0]["ReportCultureCode"].ToString(), session);
    ds.SalesOrderAckParam[0].SSRSRenderFormat = "PDF";
    ds.SalesOrderAckParam[0].SSRSEnableRouting = true;

    so.SubmitToAgent(ds, "SystemTaskAgent", 0, 0, "Erp.UIRpt.SalesOrderAck;" + "OrderAck");

}

Where are you instantiating the “so” object, is it instantiated?

I found the issue the contract i was calling was for sales order and not Sales orderAck