excel报表开发工具FineReport自定义导出按钮

 时间:2024-10-13 23:49:52

报表嵌在iframe中报表未嵌在iframe中

工具/原料

FineReport

1. 报表嵌在iframe中

1、如果是报表嵌在iframe中,在html页面可直接调用FR内部的导出方法,如导出PDF、导出Excel(分页)、导出Excel(原样)、导出Excel(分页分sheet)、导出Word等,界面效果如下:

excel报表开发工具FineReport自定义导出按钮

2、需要添加的代码如下<buttontype="button"onclick="document.getElementById('reportFrame').contentWindow.contentPane.exportReportToPDF()">导出[PDF]</button><buttontype="button"onclick="document.getElementById('reportFrame').contentWindow.contentPane.exportReportToExcel('page')">导出[Excel](分页)</button><buttontype="button"onclick="document.getElementById('reportFrame').contentWindow.contentPane.exportReportToExcel('simple')">导出[Excel](原样)</button><buttontype="button"onclick="document.getElementById('reportFrame').contentWindow.contentPane.exportReportToExcel('sheet')">导出[Excel](分页分Sheet)</button><buttontype="button"onclick="document.getElementById('reportFrame').contentWindow.contentPane.exportReportToWord()">导出[Word]</button>

2. 报表未嵌在iframe中

1、还有一种情况视报表没有嵌入在iframe中或者导出的报表与预览的报表不同,这时可以采用window.open()方法。这时可以将上述的button的onclick事件修改,代码为<buttontype="button"onclick="window.open(FR.cjkEncode('/WebReport/ReportServer?reportlet=doc/Primary/Parameter/parameter.cpt&地区=华东')+'&format=excel')">导出[Excel]</button>

  • html5表格制作软件:FineReport 结果集筛选
  • FineReport制作report:超级链接参数传递
  • SqlDbx结果怎么设置显示列类型
  • Unsupported major.minor version 51.0
  • plsql 导入csv文件导入oracle数据库
  • 热门搜索
    水浒传手抄报 六一儿童节的手抄报 爱国手抄报内容 防溺水安全手抄报 防溺水手抄报大全图片 防火手抄报 手抄报模板简单又漂亮 节水手抄报简单又漂亮 传承红色基因手抄报 1~6年级一等奖手抄报