Jump to content
Changes to the Jaspersoft community edition download ×

Why does the column header repeat in excel output when run from visualize commands?


Recommended Posts

jasperserver Version: 6.0.0Build: 20141128_1450

my report contains a title band with a customized title depending on input parameters and then the detail band contains a table for the subquery.

the table has a column header row which is repeated for each of my pdf pages.  However, if I specify xlsx output, I don't want it to repeat.  If I run the query directly from jasperserver and then use the file icon to select export as xlsx, I get my 2 rows of title and 1 row of column header.  If I run the query via my visualize.js calls, I get 2 rows of title, and the column row is repeated every page.  How do I get rid of that?  I have the following properties in my jrxml

<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ContributionsByFilerID" language="groovy" pageWidth="792" pageHeight="612" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="752" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" uuid="604b7d16-b321-4d3f-b4d7-290ff6ab6d3d">
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="TECInternal"/>
<property name="ireport.jasperserver.url" value=""/>
<property name="ireport.jasperserver.user" value="jasperadmin"/>
<property name="ireport.jasperserver.report.resource" value="/public/Test_Data/ContributionsByFilerID_files/main_jrxml"/>
<property name="ireport.jasperserver.reportUnit" value="/public/Test_Data/ContributionsByFilerID"/>
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/>
<property name="net.sf.jasperreports.export.xls.ignore.cell.background" value="true"/>
<property name="net.sf.jasperreports.export.xls.ignore.anchors" value="true"/>
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.1" value="pageFooter"/>
I have tried <property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.2" value="columnHeader"/> but it changes nothing so I removed it.

The following is  the container I use.  I get multiple rows of just column headers.  The code $outputformat in red below is either pdf or xlsx.

Container code:

var t = encodeURIComponent("u=PUBLIC2|expireTime=';
echo $expire;
echo '");
auth: {
           token: t,
           preAuth: true,
           tokenName: "tec-pp"
}, function (v) {
        //render report from provided resource
        var $button = $("#button");
        var is_ready = false;
        var export_pending = false;
        var report = v.report({
            resource: "';
echo $reportString;
echo '",           container: "#container",';
echo $parmString;
echo ',
            error: handleError,
            success: onVisualizeReady
        //show error
        function handleError(err){
        function onVisualizeReady(){
            if (export_pending) {
                alert("running pending")
        function doExport(){
            report.export({ outputFormat: "';
echo $outputformat;
echo '" }).done(function (link) {
                window.open(link.href); // open new window to download report
            }).fail(function (err) {
        $button.click(function () {
            if (is_ready) {
            else {
                export_pending = true;


Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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...