I found this great example on http://dynamics-ax.blogspot.dk/ on how to create a simple custom SSRS Report for Microsoft Dynamics AX.
In this example I have created a custom SSRS report for Dynamics AX 2009 instance.
The query, has a Range of SalesId, and in doing that, this was auto added to the report parameters, in the VS2008 projects. (see below image)
This is the name of the parameter in the report def., and therefore important to note for our exercise.
So the task was to take and pass values to reports from X++. I took and create a job that does exactly that. It takes and call my custom reports, output menu item, and pass it a value for the SalesId parameter. The code follows.:
CustRptMI = new MenuFunction(menuItemOutputStr(srsCustomRpt),MenuItemType::Output)
Args = new Args();
Notice the name of the parameter is exactly the name it is in the VS2008 project for the report def. ‘qryCustomSSRS_SalesId’. Then simply and = and then . You can add multiple parameters here with commas, and there you have the report being called, ran, and from X++, parameters being passed and the report generated. (See image below)
So as you can see, you can make use of X++ to call custom SSRS reports, pass in paramaters, and do this pretty simply. You just have to know the exactly parameters names, and you can go from there.