How can I pass an arbitrary object to jasper report as parameter?

后端 未结 2 762
遇见更好的自我
遇见更好的自我 2020-12-15 00:11

I would like to pass as a parameter to my .jrxml an arbitrary object of my domain, e.g a Person.

InputStream reportFile = MyPage.this.getClass().getResource         


        
2条回答
  •  佛祖请我去吃肉
    2020-12-15 00:25

    Yes, it is possible exactly the way you explained. Just make sure you have the correct classpath when compiling the jrxml and be careful with the case - either lowercase (person) or uppercase (PERSON) in all places.

提交回复
热议问题