My report project artifacts as below:
1. one AOT query.
2. a custom report controller which extends the "SrsReportRunController".
3. SSRS report
4. A menu item which link to the SSRS report controller which i created above.
In order to filter the report data programmatically, i tried to figure it out by two approaches.
1. try to update the query range by use the controller.
i tried to override two methods as below:
in above methods, i tried to get the report query by call "this.getFirstQuery()", but always return null.
so i gave up. try to solution two.
2. try to assign the report parameter in the controller.
i defined the parameters on the report. and bound it to the report filter, override below methods
in the above methods, i tried to assign the value, but i got the error information as "the parameter xxxx does not exist".
the last approach is using the custom RDP, (not try yet) but i think above two solution should work as well, right ?
Does your report get data from the query without issues?
If so, I can't think about anything that can cause the problem. You could debug getFirstQuery() to see whether the whole query contract map is empty, or something fails when retrieving an individual contract.
Try using the below code to retrieve the report query in prePromptModifyContract method:
You can find the example of this in HcmAccomodationListController class.
Please let me know if it does not resolve issue.
It's pretty tricky that i create a new query which has the same data source, and a new report link to the query. i use the same controller to open the report and i can get the query now, they are almost the same.
even though the report can work now, but i'm still confused why the first one cannot work.