Hi,
It’s a little bit different architecture, you must implement controller class to take your current record as parameter.
You can take a look in VendInvoiceDocumentController for exemple.It will be helpful.
In general, your report controller should get the active record from the caller and either add a query range, or fill a value in data contract (depending on how your report works). This can be done in controller’s preRunModifyContract().
It’s not a detailed answer, nevertheless I’m not sure which part you’re struggling with. Let’s talk about details after we reduce the scope.
You didn’t say that. You said that you’re not a developer, therefore I assumed that you’re somebody in a different role who thought that it can’t be too difficult to make a few changes. Don’t forget that we don’t know anything about you or your problem unless you write it down here, therefore it’s extremely important to share as much information as possible. Don’t assume that we can read your mind.
From now, don’t use the excuse that you’re not a developer. You’re a developer who has a plenty to learn.
Back to your question. We gave you some hints, but all we got from you is “its confusing”. That’s not very detailed. Please try it again and tell us what’s so confusing for you.
I also suggest you don’t try to implement the whole thing at once. Split it to several parts and implement them one by one. For example, you can first learn how to get the active record, without bothering how to filter the report.
Dealing with complexity is the most important task for every developer and if you’re a newbie, it’s even more important for you. Work in small steps, otherwise the complexity paralyzes you.
Ok i will try to be more explicit .You have to add a controller class wich contain a method like this one:
this sample of code is for printing a selected purchase oder.
protected void prePromptModifyContract()
{
VendPurchOrderJour dataTable;
POReportContract contract;
if(this.parmArgs() && this.parmArgs().record())
{
contract = this.parmReportContract().parmRdpContract() as POReportContract;
dataTable = this.parmArgs().record();// retrieving the table selected
contract.parmPurchId(dataTable.PurchId);//retrieving the current record id as parameter
}
}
and after that you have to put the name of controller class instead of DPClass in visual studio properties.
First of all, make sure that you have the documentation on hand: Development Tasks for Reporting [AX 2012]. You might also want to look at some tutorials written by other people (such as this). This will give you some idea about how report development works, how to create basic classes and so on.
Create a controller class (a new class extending SrsReportRunController) and implement the main() method. Like this:
public static client void main(Args _args)
{
YourController controller = new YourController();
controller.parmReportName(ssrsReportStr(YourReport,Design));
controller.startOperation();
}
Make sure you understand what it does before continuing.
Then create a menu item pointing to this class and use it in your form. Set DataSource property of the menu item button the the datasource you want to get in the class.
Then you can call _args.record() in main() method to get the record. It’s not the right place where you should do it, but it will prove that you can get the record to the class.
You have to create your visual Studio Project for SSRS reports like when using RDPClasses. In properties you have assigned the name of RDPClasse. In this case you have to assign the name of your controller class. Is it clear now?