When exporting tables, if a text field in a table cell has no value (i.e., blank when null or empty string) then the font size is getting set to 1. Is there a way to prevent this and keep the font size as defined in the jrxml?
I’ve attached the .jrprint and the resulting .docx file from Aspose.Words for JasperReports.
Hi Patrick,
Hi Tahir,
Attached is the .jrxml file.
The datasource is an Oracle database, but I’m just creating a dummy row using the DUAL table in my query. But I think all you have to do is create a table and just insert a text field into one of the Detail columns with the text being an empty string ("").
Hi Patrick,
Hi Tahir,
I’m getting a “Not Found: Forum Not Found” error when I click on the link.
Also I am using the latest version of Aspose.Words for JasperReports 1.7.0.
Hi Patrick,
Please accept my apologies for your inconvenience.
Please use the AWExporterParameter.POSITIONED_STYLE parameter as described below:
- Create style form Styles sub-tree (in iReports Designer) e.g "style1"
- Use the AWExporterParameter.POSITIONED_STYLE as highlighted in following code snippet.
AWDocxExporter exporter = new AWDocxExporter();
exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
exporter.setParameter(AWExporterParameter.POSITIONED_STYLE, “style1”);
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, output);
exporter.exportReport();
Hi Tahir,
I tried your suggestion for setting the POSITIONED_STYLE parameter but the issue is still there.
I attached a zip file with the .jrxml and .csv datasource. Please extract to the C: drive, it will create a subdirectory called “Table”. You can use an empty datasource for the main report. I have a hardcoded path to the csv file in the table’s datasource.
Also in the zip file is a .jrprint file and the .docx generated from Aspose.Words for JasperReports.
Hi Patrick,