JasperReports gridlines in Excel now showing

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

JasperReports gridlines in Excel now showing

Postby imre_tokai » Fri Jun 30, 2017 4:24 pm

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!
Imre Tokai, Software Engineer
iTech Professionals, Inc.
User avatar
imre_tokai
 
Posts: 33
Joined: Mon Mar 26, 2012 12:18 pm

Re: JasperReports gridlines in Excel now showing

Postby erdione » Fri Jun 30, 2017 5:32 pm

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
Fabrice
erdione
 
Posts: 112
Joined: Thu Feb 01, 2007 1:19 pm

Re: JasperReports gridlines in Excel now showing

Postby imre_tokai » Fri Jun 30, 2017 7:12 pm

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
Imre Tokai, Software Engineer
iTech Professionals, Inc.
User avatar
imre_tokai
 
Posts: 33
Joined: Mon Mar 26, 2012 12:18 pm

Re: JasperReports gridlines in Excel now showing

Postby imre_tokai » Fri Jun 30, 2017 7:23 pm

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!
Imre Tokai, Software Engineer
iTech Professionals, Inc.
User avatar
imre_tokai
 
Posts: 33
Joined: Mon Mar 26, 2012 12:18 pm


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 6 guests