Report against mulitple instances for comparison

I am wondering if it is possible to create a report against multiple instances in order to do a comparison of the two selected instances. I know you can create a parameter of type List of Entities, however I am unsure of how to access this list of entities in a sub band of type SQL statement.

I have used ${headerBand.id} syntax before but this only passes in once instance at a time and seems to just run the report once for each instance. I am trying to run the report once and select data from both instances at the same time to do a field level comparison.

Please let me know if this is possible.

Thank you,

Corey Amoruso

I found the answer to my question in this other thread.

https://www.cuba-platform.com/discuss/t/how-to-pass-parameter-with-entity-list-to-native-sql-query/2357