Jump to content

Recommended Posts

Posted

HI,

My report's data is not auto resized in excel export of jasper server. I don't want to wrap the data. Is there any property to auto increase the length of field in excel export?

 

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

Hi,

You can control the exporter as shown below,

JRXlsxExporter exporter = new JRXlsxExporter();
exporter.setExporterInput(new SimpleExporterInput(print));
ByteArrayOutputStream os = new ByteArrayOutputStream();
exporter.setExporterOutput(new SimpleOutputStreamExporterOutput(
os));
SimpleXlsxReportConfiguration config = new SimpleXlsxReportConfiguration();
config.setOnePagePerSheet(false);
config.setDetectCellType(true);
config.setIgnoreCellBackground(false);
config.setWrapText(true);
config.setRemoveEmptySpaceBetweenRows(true);
config.setCollapseRowSpan(true);
exporter.setConfiguration(config);
exporter.exportReport();
 
Posted

Actually code posted above is for Exporting Excel using Jasper from Java. I am not sure about the Jasper studio. I use ireport designer and there i can set tthese options in - Tools - Options - Export Options- Excel

Posted

Click on the main report and go the advanced option and hit the propteries. This is the place where we can set properties while excel exporting in Jasper Server.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...