Quantcast
Channel: Microsoft Dynamics AX Forum - Recent Threads
Viewing all articles
Browse latest Browse all 175888

how execute query of ax from method of SSRS report

$
0
0

i want execute query of ax2012R3 from method of SSRS report

so i created this method for salesinvoice report for textbox expression but show me error on that textbox 

[DataMethod(), PermissionSet(SecurityAction.Assert, Name = "FullTrust")]
    public static string DirctSales(string SalesId)
    {
        DataTable dt = new DataTable();
        dt = AxQuery.ExecuteQuery("Select PurchId,PurchName from purchtable Where purchtable.InterCompanyOriginalSalesId==" + SalesId);

        if (dt.Rows.Count > 0)
        {
            string Purchid = "";
            string Purchname = "";
            foreach (DataRow row in dt.Rows)
            {
                Purchid = row[0].ToString();
                Purchname = row[1].ToString();
            }
            string WordSalesId = "MR/" + Purchname +  " your slaesid is  " + Purchid;
            return WordSalesId;
        }
        else
        {
            return "";
        }
        throw new NotImplementedException("The method or operation is not implemented.");
    }



Viewing all articles
Browse latest Browse all 175888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>