I have compiled report (.jasper
file). I need to get some info from that object (for example report name). How to do that ? If I could create JasperReport object, i can call getName()
method on it, but I don't know how.
Asked
Active
Viewed 1.4k times
17

marioosh
- 27,328
- 49
- 143
- 192
1 Answers
25
You can get the JasperReport object by doing:
JasperReport jasperReport = (JasperReport)JRLoader.loadObject(new File("filename.jasper"));
from there you can get the name by doing:
jasperReport.getName()

Jacob Schoen
- 14,034
- 15
- 82
- 102
-
I have a .jasper file, how do i create a PDF file? – powder366 Nov 02 '17 at 15:45