Though we have feature to have multiple joins feature available at RD however having conditional join facility is still missing at RD. For example I have a source table Joins with Access Group table which can Joins with two different keys (e.g. Key1 & Key2) for display data for GroupA & Group B. Now with the exisitng situation I would need to create two RD rule. But if we have a this component conditionalized with when rule, we can just reference when rule for Group A or B and having the conditional joins implemented. This will help us promote the reusability and reduce the creation of multiple rule just because of conditional joins.
***Updated by Moderator: Lochan. Removed user added SR Created tag. Apologies for confusion, shouldn't have been an end-user option; removed personal information.
So if I understand correctly, you would like a condition say mainclass.property1 = joinclass.key1 to be the only one in certain scenarios and in other scenarios you would like mainclass.property1 = joinclass.key2 to be the only join condition. And you would like this scenario to be controlled by a when rule?
Would it be possible to dynamically pass the filter using pyReportParamPageName parameter to pxRetrieveReportData API to execute based your condition?
Thanks Rajiv for the input. Yes! you understood it correctly and ofcourse that can be a work around. But that again would cost another set of rules for passing or setting the parameters. My objective is enhance the reusability of RD and reduce the creation of any other extra rules. If we have option to call "When rule" at edit Condition itself we can conidtionally have different joins. Hope! I was able explain it, else we can talk in order to understand it better.
Thanks for the details, Satish. As of now there are no plans to support when rules to decide how the query should be generated. This is because we want the report definition to be able to generate and retrieve results just based on SQL and not execute other rules to figure out how to generate the query.
That said, I suggest you file an enhancement request and product management will take a look.