I am Facing one issue with last 5 days pls help me and the issue is i have designed one Query based new SSRSreport and i want to access that report from " ItemForecast Form "(path oh the form is mentioned below),for this i have created one menuitem button and kept my report in that menuitem button, when iam clicking on that button first the parameter window is opening when iam selecting the ProjID(i have given ProjId as parameter in the Query level)report working fine but the requirement is from the form i am selecting one record and clicking on that menuitem button (in that record we have ProjId field) i want this projid in the report parameter and corresponding that projid i wants to generate the report.
In the below screenshot the 3rd field in the form is ProjId
PATH:: AX2012 > Project management and accounting > Inquiries > ForeCast > ItemForeCast > ActionPane > internal Reports > precalculation(this is our report).
Your Suggestions are really appreciable
I don’t fully understand what you want, but if you want the ProjID to be automatically inserted as the Parameter on the report, you can use a Controller class and use the prePromptModifyContract method.
If that’s what you want and you need further help, just tell me.
Thans for your reply ANONX
i want that Projid in the parameter as per we select the record in the form.have alook on the screen shot below
I have created preprompt modified method in controller class and when i compile the class the class it is not showing any error but when i run the report fron ForecastSales form after select the record and clicking on the menu item button it is showing an error below
Map object not initialized.
(C)\Classes\DRV_OrderdateviaforecastController\prePromptModifyContract - line 3
(C)\Classes\SrsReportRunController\startOperation - line 7
(C)\Classes\DRV_OrderdateviaforecastController\main - line 7
Please help me on the issue
How does your class look like?
Just to be sure, I’ll show you a step by step
- You create a class which extends from SrsReportRunController. Then you define a macro with the report name and the Data Contract class.
class forecastController extends SrsReportRunController
- Next you create a main method
public static client void main(args _args)
forecastController controller = new forecastController();
- Now you override the prePromptModifyContract method
protected void prePromptModifyContract()
Args = this.parmArgs();
dataContract = this.parmReportContract().parmRdpContract();
Then you create a Menu Item and choose the Controller class as the object
On the form you create a new Menut Item button and set the property “CopyCallerQuery” to “Yes”. Then you choose the created Menu Item as the MenuItemName for the button.
That should make it work then.
If u need a projid parameter in ur report, u need to include ur parameter in VS as Databound value.
There u can fetch ur projid as parameter. After u can re deploy to ur client.