CSV Export not formatting correctly

0

Hi Team,

We have some static text like report name and run by in Page Header section then we have a table component in the Group Header section to display data in tabular format.

The export works fine in PDF format however with CSV we can see some extra blank columns getting generated like below:

Can you please help me to resolve this issue.

        Test Report        
              Run Date: ########
 Name Login First Name Last Name   Number  Date   Country  
sfdsafdf reykxcfg tyjkurtgerq n rhyreiumk   132356 22-Feb-08      

 

puneet.040289's picture
Joined: Feb 11 2019 - 10:14pm
Last seen: 6 days 7 hours ago

1 Answer:

0

Looks like you're getting some unwanted content in csv output, probably from a page header or title band - look at the 'exclude' optoins in the jasper config reference:

http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasper....{format}.exclude.origin.{suffix}.{arbitrary_name}

You can exclude items on a per format basis by key (remove on a per element basis) or band (remove entire band) for a specific format. The documentation is a little lacking but a simple google search will get you what you're looking for -

    <property name="net.sf.jasperreports.export.csv.exclude.origin.band.pageHeader" value="pageHeader"/>
darth_fader's picture
Joined: Mar 7 2010 - 9:45pm
Last seen: 1 day 17 hours ago
Feedback
randomness