Hi,
I have a question in regards to a recent enhancement in 365 for CustAgingReport. The requirement wanted to add an additional field(s) to the contract and I created a new class that extends the contract. The controller class I wanted to do the same thing, though, found that within the CustAgingReportController there is a private method that updates the ReportStr. The controller class cannot use the extends, with the embedded private method, which means I have to extend from the class SrsReportRunController. Within the new controller class, changed the references to the Contract to point to the new extension, and while executing I found the new field(s) not being displayed. Attempted to create an extension on the UIBUILDER and change my controller class to point to the new extension of the UIBuilder. This time I created a class and added a postHandler for the build method for the new UIBuilder, so I can debug and monitor the processing contract. The passed in contract was the standard contract, not the new one, which means the new field is not accessible. So, assuming that pointing the extension to SysOperationContractProcessingAttribute is not being recognized. And while I wanted to continue even further, realized that the DP class would have to be duplicated, since the contract call, would point back to the standard Contract. At this point, I backed out of everything, and was informed the parameter was no longer required.
My solution was easier to manage at this point, use the new Controller class and add a PostHandler to the DP.ProcessReport method. This allowed me to control and manage the data, before passing over to SSRS.
The question I have is how would you handle the additional parameter within the contract. With going through the scenario that I described, it seems to be more efficient to create new classes to manage all 4 parts (Controller, Contract, UIBuilder and DP). Looking for opinions or thoughts.
Thanks
Bill
*This post is locked for comments
Hi Sukrut,
That's what I was thinking, after discovering the extension would not work, the postHandler for the ProcessingReport from the DP class work worked pretty well. The parameter requirement was moved to the aging definition, which allowed me to proceed without updating the Contract.
Thanks for your feedback.
Bill
Hi Sohaib,
The issue is the CustAgingReportController class has a private method called getReportName, which would overwrite this PostHandler call. Appreciate the suggestion.
Bill
have you tried using post event handler for controller class, given following sample code.
class NameOfNewClass
{
[PostHandlerFor(classStr(CustAgingReportController), staticMethodStr(CustAgingReportController , construct))]
public static void ReportNamePostHandler(XppPrePostArgs arguments)
{
CustAgingReportController controller = arguments.getReturnValue();
controller.parmReportName(ssrsreportstr(CustAgingReport, NewDesignName));
}
}
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,228 Super User 2024 Season 2
Martin Dráb 230,056 Most Valuable Professional
nmaenpaa 101,156