I am creating a report with JasperReports using the generated iReport jrxml file.
My application is multilingual, (English (LTR) and Persian (RTL)). In the generated tables regarding the direction of the text, I need to change the direction of the entire page. Plus I use the locale .
I googled a lot and finally found an attribute JRXlsAbstractExporter.PROPERTY_SHEET_DIRECTION, "RTL", but setting this attribute in excel forced formats has no effect on my report.
params.put(JRXlsAbstractExporter.PROPERTY_SHEET_DIRECTION, "RTL");
JasperPrint jasperPrint = JasperFillManager.fillReport(report,params,
dataSource != null ? new JRMapArrayDataSource(dataSource) : new JREmptyDataSource());
the other thing I tried sets this in the exporter's parameters as follows:
JRExporter exporter = new JRXlsxExporter();
exporter.setParameter(JRXlsAbstractExporter.PROPERTY_SHEET_DIRECTION, "RTL");
exporter.exportReport();
but setting this option is not allowed and I get an error.
If you have any experience with how to change the direction of the report page (or, in other words, reflect the entire report in a specific locale), please help.
source
share