*This post is locked for comments
Hi,
You can execute an Ax Query from a datamethod.
See details on MSDN: http://msdn.microsoft.com/en-us/library/cc553656.aspx
It would look like this:
[DataMethod(), AxSessionPermission(SecurityAction.Assert)]
public static DataTable GetCustomerData()
{
// Create a data table.
DataTable table = new DataTable();
// Execute the CustGroupSRS query that is defined in Microsoft
// Dynamics AX. Select all the fields from the query.
table = AxQuery.ExecuteQuery("select * from CustGroupSRS");
// Return the data table.
return table;
}
Or you could build a query directly against an AX table. See the following MSDN article for details.
http://msdn.microsoft.com/en-us/library/cc587341.aspx
I hope this helps.
--
This posting is provided "AS IS" with no warranties, and confers no rights
Hi,
I think you can use AIF or business connector for this. The AX query is then available for the outside world like VS Reporting through a webservice or through code (business connector). I think reporting services as defined by AX is the best way to go. I do not see the advantage why you want to use VS project for it. But that is up to you.
J.
You mean an AX query in a separate independent VS Studio project? Or the use of reporting services on top of AX? I think the last is the best way to go.
select InventTable
is the simplest. The syntax is more or less the same as SQL. You can look at samples yourself in the AOT. Define your requirement and then lookup the code and try to understand the sample. I think a report uses a datasource. Not sure, not done so far. Copy and existing report and play around with it. Also see the Inside Dynamics book, I think it has a sample also.
André Arnaud de Cal...
293,944
Super User 2025 Season 1
Martin Dráb
232,838
Most Valuable Professional
nmaenpaa
101,158
Moderator