问题
I have created a RDP report without query , only with classes: contract, controller data provider and I am having issues the parameters passing to rdp class, in batch dialog I take the customer order selected when I click ok nothing appears it doesnt pass the value to dp class(it is suppozed to show the sales order related to that customer). Any suggestion or it is just a AX service problem ?
回答1:
Even though it's been years, but I don't see any answer accepted - so will suggest an answer.
"You will need to refresh the data source on the report itself as well. As the parameters aren't refreshed there unless you manually go and refresh the data source on the report".
I hope this helps somebody else as well.
Thanks, Rizwan
回答2:
You can use the prePromptModifyContract
method of your controller class to update dialog fields.
Provides the opportunity to modify the contract before the dialog is shown to the user.
This method is invoked for interactive scenarios. This method is not invoked for batch scenarios. This means any member variables instantiated in this method will not be available for the lifetime of the controller in batch scenarios
See also Using Controller Class in Developing SSRS Reports in Microsoft Dynamics AX 2012.
If you have a report query, then retrieve it in prePromptModifyContract
or preRunModifyContract
method of your controller class:
Query q = this.getFirstQuery();
Then update the query adding ranges.
q.datasourceTable(tableNum(xx)).addRange(fieldNum(xx,ff)).value(queryValue(123));
来源:https://stackoverflow.com/questions/33396245/parameter-not-passing-from-controll-class-to-dp-class-report-ax-2012