background image
2.1 加载 finereport.js 使用 cjkEncode 
cjkEncode 方法在 FineReport 的 JS 库中已经预先提供了,用户可以在自己的网页中引
入 FineReport 的 JS 库,就可以使用 FR.cjkEncode 对中日韩文字符进行编码,如下对调用
报表的 url 进行 cjkEncode: 
1.
 
<html>    
 
2.
 
  <head>    
 
3.
 
  <title>FineReport Demo</title>    
 
4.
 
  <meta http-equiv=
"Content-Type"
 content=
"text/html; charset=GBK"
 />
    
 
5.
 
  <script type=
"text/javascript"
 src=
"/WebReport/ReportServer?op=emb&
resource=finereport.js"
></script>  
 
6.
 
  <script language=
"javascript"
>  
 
7.
 
    function autoLoad(){  
 
8.
 
      var addr = FR.cjkEncode(
"/WebReport/ReportServer?reportlet=/doc
/Primary/Parameter/Parameter.cpt&
地区=华东"
);  
 
9.
 
      document.getElementById(
"reportFrame"
).src = addr;  
 
10.
 
    }  
 
11.
 
    window.onload = autoLoad;   
 
12.
 
  </script>  
 
13.
 
  </head>    
 
14.
 
  <body>    
 
15.
 
    <iframe id=
"reportFrame"
 width=
"900"
 height=
"400"
 ></iframe>   
 
 
16.
 
  </body>  
 
17.
 
</html>