Page 1 of 1

JasperReports gridlines in Excel now showing

PostPosted: Fri Jun 30, 2017 4:24 pm
by imre_tokai
Hello,

Unable to print gridlines to Excel reports, more in forum topic:
https://www.servoyforge.net/boards/13/topics/979

Any idea how to show gridlines, like they were before?

Have a good weekend!

Re: JasperReports gridlines in Excel now showing

PostPosted: Fri Jun 30, 2017 5:32 pm
by erdione
Hi Imre

Is it existing report that was ok before upgrading servoy jasper plugin or new report?

you can try to add this property in your jasper report
net.sf.jasperreports.export.xls.white.page.background=false if it produce any difference

this page is very useful when your create jasper reports dedicated to exporting to excel
http://community.jaspersoft.com/wiki/tips-exporting-excel

edit: I just checked on existing report that add same beahaviour than yours adding this property solve the problem
If the same report has different exel output depending on the plugins version, it should be a change in the jasper library because Servoy don't touch any of this properties in the plugin (as far as i know)

According to the servoy jasper plugin doc:
// Pass exporter parameters to the export process in runReport
//var params = new Object();
//params["EXPORTER_PARAMETER:net.sf.jasperreports.engine.export.JRPdfExporterParameter.METADATA_TITLE"] = "Test title";
//params["EXPORTER_PARAMETER:net.sf.jasperreports.engine.export.JRPdfExporterParameter.METADATA_AUTHOR" ] = "Test Author";
//var r = plugins.jasperPluginRMI.runReport("myServer","someReport.jrxml","path/to/someReportExported.pdf",OUTPUT_FORMAT.PDF,params);

so your solution:
Change your servoy code adding this line in your excel export call
params["EXPORTER_PARAMETER:net.sf.jasperreports.export.xls.white.page.background"] = 'false';

OR
Add the property in all your report that could your be exported
net.sf.jasperreports.export.xls.white.page.background = false

Re: JasperReports gridlines in Excel now showing

PostPosted: Fri Jun 30, 2017 7:12 pm
by imre_tokai
Thank you for your sharp and quick guideline Fabrice,

Added
Code: Select all
net.sf.jasperreports.export.xls.white.page.background=false
in report inspector parent Properties->Properties as 4th property next to defaults:
Code: Select all
ireport.zoom, ireport.x, ireport.y
and it worked! Needed to go through all .jrxml reports.

Regards

Re: JasperReports gridlines in Excel now showing

PostPosted: Fri Jun 30, 2017 7:23 pm
by imre_tokai
Found that your inliner did the magic already
Code: Select all
params["EXPORTER_PARAMETER:net.sf.jasperreports.export.xls.white.page.background"] = 'false';

Both of your suggestions work.

Thank you again Fabrice!