Change field name in Jasper

Asked

Viewed 232 times

2

I’m putting together a report and as I work with more than one table, there are equal field names. Jasperstudio started adding the Fields giving names like: COLUMN_1, COLUMN_2, etc.

My question is: Can you change these names without putting in Description? When I change and try to run the report, it returns me the error:

net.sf.jasperreports.engine.JRException: net.sf.jasperreports.engine.JRException: Unknown column name id_projeto in result set.

  • 1

    The fields you refer to would be the name of the columns in your tables? Give more details, if possible, post your query.

  • 1

    That’s right, it’s two camps. the query looks like this: select u.firstname, u.lastname, wp.id, wp.Subject, t.id, t.name, p.id, p.name, sum(hours) as hours, te.spent_on from time_entries te Inner Join work_packages wp on wp.id = te.work_package_id Inner Join users u.id = te.user_id Inner Join types t on t.id = wp.type_id Inner Join Projects p on p.id = wp.project_id Where u.id = $P{usuario} and te.spent_on between $P{startCount} and $P{endCount} and t.id = and p.id = group by wp.id by te.spent_on order

  • 1

    Do you test your query? Dude, this database language I don’t know, but can you store this result in a list? In what language is its application?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.