I am using iReport 0.5.3 with JasperReports 1.1.1. I have defined a style in my report using iReport and applied it to some text fields (let's call this style 'col_header'). When I run the report from my java program, it works well and also shows the text fields with the applied style. Now, is there a way, where I can get col_header style from report during run-time and modify some of it's properties. I have tried the following way, but this did not work. It still shows the text fields with earlier style. Basically I want to externalize the style for my reports(similar to css in HTML). Any help on this will be greatly appreciated. //Code Snippet JasperPrint jasperPrint = jasperPrint(dataSource, reportParameters, templateLocation); JRStyle style = jasperPrint.removeStyle("col_header"); //Altering few properties in style style.setFontSize(12); style.setForecolor(new Color(50,50,50)); //Adding the modified style to the report jasperPrint.addStyle(style); JasperExportManager.exportReportToPdfFile(jasperPrint, "/sample.pdf"); // Thanks, Pushkar |
- [jasperreports-questions] Setting style at run-time Pushkar
- [jasperreports-questions] Setting style at run-time Pushkar
- Re: [jasperreports-questions] Setting style at run... Lucian Chirita