Referencing a Bean in JasperReports

Thanks to this answer on StackOverflow, I know how easy it is to reference the bean itself instead of one of its properties in a text field expression in JasperReports. The trick is to declare a field whose description is set to the keyword _THIS:

Then it can be referenced in the text field expression as follows:

About the author

Uwe

Software developer with experience in Java, JavaFX, EMF, OSGi, and a little bit of Swift. I live and work in Munich.

I use this website mainly as a journal and personal knowledge data base.

My PGP key is here. There are other keys listed for me, but I use this one exclusively.

Fingerprint: 232F 05C4 01BE F43D 0434 0A8A 4ED3 5720 477E EF40

View all posts

Leave a Reply

Your email address will not be published. Required fields are marked *