在查看报表的时候,我们一般会需要锁定表头的功能:在列很宽,或者记录的行数很多用一屏不能完全显示的时候我们就需要在上下或者左右拖动的时候将表头固定
润乾报表为我们提供了锁定表头的功能,我们通过两步设置就可以实现:
第一步:在raq文件中设置表头(在需要上下拖动的时候需要设置表头,在需要左右拖动的时候需要设置左表头)
第二步:在发布润乾报表的页面的润乾标签里设置:needScroll="yes"
类似下边:
<report:html
name="bankDetailReport" reportFileName="<%=ConstantsDefine.PLAN_REPORT_KEY_VALUES%>"
params="<%=params.toString() %>"
excelPageStyle="0"
needSaveAsExcel="yes"
excelLabel="<font style='cursor:hand; text-decoration: underline;' color='blue'>存为EXCEL</font>"
needSaveAsPdf="no"
pdfLabel="<font style='cursor:hand; text-decoration: underline;' color='blue' >存为PDF</font>"
needSaveAsWord="no"
saveAsName="计划执行情况"
width="0"
needScroll="yes" --在这里设置
scrollWidth="99%"
scrollHeight="260">
</report:html>