下面是关于finereport报表6.5版本自定义页面代码,拿出来供大家分享学习~
1. <html>
2. <head>
3. <title>自定义浏览页面</title>
4. <meta http-equiv="Content-Type" content="text/html; charset=GBK">
5. <link rel="stylesheet" type="text/css" href="/WebReport/ReportServer?op=resource&resource=/com/fr/web/core/page.css"></link>
6. <link rel="stylesheet" type="text/css" href="/WebReport/ReportServer?op=resource&resource=/com/fr/web/load.css"></link>
7. <script type="text/javascript" src="/WebReport/ReportServer?op=resource&resource=/com/fr/web/load.js"></script>
8. <script type="text/javascript">
9. $(function() {
10. var $toolbar = $("#toolbar");
11. $reportPane = $("#reportPane").PagePane();
12. $reportPane.PagePane("load", '/WebReport/ReportServer?reportlet=/com/doc/cross.cpt');
13. // 布局
14. var $container = $("<div>").appendTo($("body")).css({height:"100%", width:"100%"}).__border__([{
15. region : "north", el : $toolbar
16. }, {
17. region : "center", el : $reportPane
18. }]);
19. $container.doLayout();
20. $(window).resize(function() {
21. $container.doLayout();
22. })
23. })
24. </script>
25. </head>
26. <body>
27. <div id="toolbar">
28. <button type="button" onclick="$reportPane.PagePane('gotoFirstPage')">首页</button>
29. <button type="button" onclick="$reportPane.PagePane('gotoPreviousPage')">上一页</button>
30. <button type="button" onclick="$reportPane.PagePane('gotoNextPage')">下一页</button>
31. <button type="button" onclick="$reportPane.PagePane('gotoLastPage')">末页</button>
32. <button type="button" onclick="$reportPane.PagePane('pageSetup')">页面设置</button>
33. <button type="button" onclick="$reportPane.PagePane('pdfPrint')">客户端PDF打印</button>
34. <button type="button" onclick="$reportPane.PagePane('flashPrint')">客户端FLASH打印</button>
35. <button type="button" onclick="$reportPane.PagePane('printReportServer')">服务器打印</button>
36. <button type="button" onclick="$reportPane.PagePane('exportReportToPDF')">导出[PDF]</button>
37. <button type="button" onclick="$reportPane.PagePane('exportReportToExcel')">导出[Excel]</button>
38. <button type="button" onclick="$reportPane.PagePane('exportReportToWord')">导出[Word]</button>
39. <button type="button" onclick="$reportPane.PagePane('emailReport')">邮件</button>
40. </div>
41. <div id="reportPane"></div>
42. <div style="position:absolute">
43. <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1" height="1" id="flashMovie" align="center">
44. <param name="movie" value="/WebReport/ReportServer?op=resource&resource=/com/fr/web/core/printer.swf&gzip=false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />
45. <embed src="/WebReport/ReportServer?op=resource&resource=/com/fr/web/core/printer.swf&gzip=false" quality="high" bgcolor="#ffffff" width="1" height="1" name="flashMovie" align="center" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
46. </object>
47. </div>
48. </body>
49. </html>