Everybody:
I just make a SSRS report with AX report tools. Sometimes we must get data from AX query. I know how to add a dataset that use AX query, but not all dataset can from standard query, sometimes I must create business logic type dataset because I must process these data.
When I use business logic dataset, I had learned how to get data from SQL query, and know how to return dataTable to dataset. But I don’t know how to get data from user-defined AX query.
I can fetch data from SQL query with below codes:
DataTable table = new Syste开发者_运维知识库m.Data.DataTable(); // new table variable
table = AxQuery.ExecuteQuery("SELECT * FROM InventTable");
but I can’t build success with the codes below:
remark: I had created a ventTableSRS
query in AX AOT.
DataTable ItemQueryTable = FIMCommonHelper.GetParameterDataTable(
FIMAxQueries.InventTableSRS,
new object[] { },
new object[] { });
I found the class of FIMaxQueries
don’t include my query(InventTableSR
S). I try to found where the class of FIMAxQueries
is, but I don’t get a result.
Could someone tell me how to write the codes, so that I can run an AX query and retrieve the result in SSRS report project business logic data method? The best way is to show me a sample codes.
Thanks you very much!
Spark
EveryGuy:
I don't get the answer here but I search some solution , I paste some sample codes here.
you can copy these codes into your dataset methods and modified it .
-- begin
// get no parameter query
#region get value of inventTableQuery
DataTable ItemQueryTable = FIMCommonHelper.GetDataTable("InventTableSRS");
/* // get parameter query
DataTable ItemQueryTable = FIMCommonHelper.GetParameterDataTable(
FIMAxQueries.InventTableSRS,
new object[] { },
new object[] { });
*/
-- end
I had test it in my reports design. expert someone can use it. Good luck!
Spark
精彩评论