可以试一下这个,将多个不同好的报表整合到一个excel的不同sheet中,但url有长度限制,可以改为post方法解决。
var htbm=_g().getParameterContainer().getWidgetByName("htbm").getValue();
var startdate=_g().getParameterContainer().getWidgetByName("startdate").getValue();
//参数两边加"",不需要将空值转换为null
var form1=
{reportlet:"/财务/销售合同明细/aaaaaaa.cpt",
htbm:htbm,
startdate:startdate,
enddate:enddate
};
var form2=
{reportlet:"/财务/销售合同明细/bbbb.cpt",
htbm:htbm,
startdate:startdate,
enddate:enddate
};
var form3=
{reportlet:"/财务/销售合同明细/cccccc.cpt",
htbm:htbm,
startdate:startdate,
enddate:enddate,
htlb:htlb
};
var form4=
{reportlet:"/财务/销售合同明细/ddddd.cpt",
htbm:htbm,
startdate:startdate,
enddate:enddate
};
var url="/webroot/decision/view/report?reportlets=["+JSON.stringify(form1)+','+JSON.stringify(form2)+','+JSON.stringify(form3)+','+JSON.stringify(form4)+"]&format=excel&__filename__=收款明细及汇总"
window.open(url);