Jump to content
JasperReports Library 7.0 is now available ×

HQL and Table / How to print Detail Section Once


Recommended Posts

Hello everybody,

I have a short question. Probably an easy one for the most of you. I have been using the "Table" object but only with SQL. As far as I understand for a "Table" I have to create a DataSet. So what I did for the Detail Section to print once I set the statement "select 1 from dual" as the master report query. To the table I gave $P{REPORT_DATA_SOURCE} as the connection expression.

Now I dont really understand how to do it with Hibernate as I cannot select 1 from dual. How do I get the Detail section to print exactly once. Maybe I have missunderstood the complete concept of the Tables.

Maybe someone could help. Thanks

Kolja

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Lets say I have this HQL: "from Test". This statement return 3 Object.

 

What I tried is to put this statement as the report query as well as to the query text for the table dataset. Now I do not understand that that the table is not shown three times but the table is shown once BUT the first row is missing.

 

Can somebody please adivse. Thanks

Link to comment
Share on other sites

I am starting to understand that JasperReport makes a difference when filling for example report using a connection and when using HQL.

when filling a report using an sql connection jasperreports behave just as I expect it to. If I fill in a report query that provides 3 rows, a table dataset that returns 5 rows then the detail section with the table will be printed 3 times and everytime with a 5 row table.

If I repeat that using HQL it behaves differently. Actually I am thinking that how hibernate reports the table dataset is not evaluated but only the report query. So If I enter a report query "from Test" that returns 3 rows and the same statement in the table dataset then I only have 1 detail section with one table having 2 rows.

Could someone please comment on how I print a table using an HQL statement without missing the first row?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...