No, you cannot do this with either a Filter or HQL report type. It would be straightforward to do the three-column version in HQL (just do a join on Bundle.requirements
and Bundle.permits
), but the reporting engine doesn’t support HQL “UNION” queries. At best, you’d have a report that looks like
Role name | Permitted | Required
Business Role 1 | (null) | IT Role 1
Business Role 1 | (null) | IT Role 2
Business Role 1 | IT Role 3 | (null)
And so forth.
You can use my JDBC Reporting library and just use SQL. That’s probably the easiest way to get the results you want, since you can trivially do a UNION in SQL.