How to get a datatable from ax to SSRs report

Source: Internet
Author: User

 

We can easily get a datatable from ax to SSRs report. All the business logic can be written in ax, and the SSRS is the data showing platform.

[DataMethod(), AxSessionPermission(SecurityAction.Assert)]public static DataTable GetData(string _PurchaseOrderId){    AxaptaWrapper ax = SessionManager.GetSession();    DataTable dt = (DataTable)ax.CallStaticClassMethod("ClassName", "StaticMethod", Parm1, Parm2...);    return dt;}

 

public static System.Data.DataTable GetData(){    System.Data.DataTable               m_DataTable;    System.Data.DataColumnCollection    m_DataColumnCon;    System.Data.DataRowCollection       m_DataRowCon;    System.Data.DataRow                 m_DataRow;    CustTable                           m_CustTable;    InteropPermission                   permission = new InteropPermission(InteropKind::ClrInterop);    ;    permission.assert();    m_DataTable     = new System.Data.DataTable();    m_DataColumnCon = m_DataTable.get_Columns();    m_DataRowCon    = m_DataTable.get_Rows();    m_DataColumnCon.Add("AccountNum");    m_DataColumnCon.Add("NameAlias");    while select m_CustTable    {        m_DataRow = m_DataTable.NewRow();        m_DataRow.set_Item("AccountNum", m_CustTable.AccountNum);        m_DataRow.set_Item("NameAlias", m_CustTable.NameAlias);        m_DataRowCon.Add(m_DataRow);    }    return m_DataTable;}

  

  

How to get a datatable from ax to SSRs report

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.