anila Posted December 8, 2008 Share Posted December 8, 2008 I have many reports in my project. I need to change the font that is displayed in the report. My .jrxml files contain about 20000 lines. It is difficult for me to change <font> tag for text element in all the .jrxml files. Is there a way that i can change the font of my reports without changing the .jrxml files??I tried to use setFont() method on JasperViewer object. But it didnot work. Link to comment Share on other sites More sharing options...
C-Box Posted December 9, 2008 Share Posted December 9, 2008 What about a small Java app that: load all your designs, parses each JasperDesign Object, create a new Style with your wanted font set this new Style to all textelements save the JasperDesign to JRXML so you could later change the font again with just ONE statement for each JasperDesignThe best thing would be a external Style - but as I've never done this before, I can't give you a hint, but perhaps anyone else!?? :-) hthC-Box Link to comment Share on other sites More sharing options...
lucianc Posted December 9, 2008 Share Posted December 9, 2008 External styles can indeed be used to keep in a single location style information that applies to multiple reports.JasperReports includes under demo/samples/templates a sample report that illustrates how to use external styles.Regards,Lucian Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now