I have added a new parameters in a class contract of standard SSRS report.
and I need to modify the query in processreport() method based on the new added parameters.
how to call or modify the query in processreport() method using the Extensions class or the event Handler?
any suggestion please?
How to do it and whether it can be done at all depends on how the data provider is implemented. Can you tell us more about it, please?
Example : in the vendor invoice report (VendInvoiceDocument) , I have to add a new parameter, so I created a class extention of "VendInvoiceDocumentContract", in order to use the range in the processreport() so i need to understund how to do it? i have only the eventhandler method so i can only add modification after or before the processreport method
You should look into processReport() to understand what it does and where would be a good place to inject your logic.If there is no better solution, you could use CoC on createData(), let "next createData()" do its job and then delete records that you don't want (that would be called below "next createData()").
So we can add our modification with post or pre event in processreport()? I have checked the createdata() and I noticed that DP class extends "SRSReportDataProviderBase" doesn't have this method so this solution will be available only for class extends "SrsReportDataProviderPreProcess"??
Thank you for your responses.
No, doing anything before or after processReport() won't help you. You want to change the behavior of processReport() itself. And you shouldn't use method handlers anymore - chain of command (CoC) is easier to use, safer and more powerful.
createData() method is defined and used in the controller we're talking about - VendInvoiceDocumentDP. It has nothing to do with either SRSReportDataProviderBase or SrsReportDataProviderPreProcess, which wouldn't be useful to you anyway. What would be the point of putting the logic to SRSReportDataProviderBase if it works only with VendInvoiceDocumentContract and therefore it works only in VendInvoiceDocumentDP (and not in any other class inheriting from SRSReportDataProviderBase)? VendInvoiceDocumentDP is indeed the right place for your logic.
If the createData() method does not exist in DP class should it be created manually and put the logic in it or what should i do?then i need to call this method on the controller class?and i need to know if i will create extension of DP class, i need to modify the dataset properties and this will not affect the design?i should re-organise it based on the new dataset?thank you for your reply,it would be much of help if u can share with me some links to resolve this issue.i need to know more about the steps in order to cutomise report on d365fo.
No, you shouldn't create any createData() method if it doesn't exist. How would it help you? createData() isn't any special framework method; it's just a method declared and called by VendInvoiceDocumentDP class. When you want to extend a class, you must look at what it does and identify the best place where you can extend it. The suggestion to use createDate() was related to your particular requirement for the particular class.
I'm not sure what you mean by your other questions. You never mentioned any new dataset - maybe it's a new topic for which you should create a new thread.