By: Patrick the Pup - patrick_the_pup
Dynamic Column Header
2002-10-24 21:18
Can JasperReport creates report based on user's choice of column ? Say I have this Address Table which consist of columns :
1. Name
2. Street
3. City
4. Zip Code
5. State
Some users might want to view reports consist of Name, Street and City column and others might want to view all column in the report. How could I do that ?
* I believe that I can't have a standard xml template since the xml file will change all the time
By: Teodor Danciu - teodord
RE: Dynamic Column Header
2002-10-27 13:52
Hi,
You could either have very complicate text field
expressions that return a particular field value,
depending on the user's choice.
In the column 5, for example, you could have a text
field with an expression containing many
conditional operators (?:), so that it displays the
field that the user chose for that column.
Another approach is to dinamically create/modify the report design, using the JasperReports API.
Those report designs would have to be compiled
at runtime, before beign filled with data.
I hope this helps.
Teodor
Dynamic Column Header
2002-10-24 21:18
Can JasperReport creates report based on user's choice of column ? Say I have this Address Table which consist of columns :
1. Name
2. Street
3. City
4. Zip Code
5. State
Some users might want to view reports consist of Name, Street and City column and others might want to view all column in the report. How could I do that ?
* I believe that I can't have a standard xml template since the xml file will change all the time
By: Teodor Danciu - teodord
RE: Dynamic Column Header
2002-10-27 13:52
Hi,
You could either have very complicate text field
expressions that return a particular field value,
depending on the user's choice.
In the column 5, for example, you could have a text
field with an expression containing many
conditional operators (?:), so that it displays the
field that the user chose for that column.
Another approach is to dinamically create/modify the report design, using the JasperReports API.
Those report designs would have to be compiled
at runtime, before beign filled with data.
I hope this helps.
Teodor
0 Answers:
No answers yet