Using entity views in reporting suite

Hi There,

I wanted to know if there was any way to specify which CUBA entity view to use when writing a JPQL query in the reporting suite?

I can’t find any obvious way to specify the view I wish to use, and having checked the reporting documentation was unable to find any reference to it there.

Many thanks

Hello.

If you write a JPQL query, reporting expects that all necessary fields are selected explicitly, and it might not work fine if the query returns entity. Example:


select u.name as "name", u.surname as "surname" from sec$User u

If you want to use entities in the reporting, you need to use “List of entities” data set type, and there you can select the necessary view.

Also, you can use the “Report wizard”, which allows to select necessary attributes for enitites and generates the JPQL query automatically.

Please let me know if you have more questions.

1 Like

ok, thank you for your assistance - I’ll give this a go