欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

OBIEE经验记录以及解决问题的方案

程序员文章站 2022-05-24 08:20:05
...

mark

 

定时刷新仪表盘页面:

在页面上,增加一段文本,需要勾选html属性。

<META HTTP-EQUIV = "REFRESH" CONTENT = "1">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE" >

 

以上手段,无需确认,但是不足时,无法把提示器的值带进去重新执行查询。效果是每次都是重新打开页面。

 

第二种方法:

<script>
var limit="0:10";
if (document.images){
    var parselimit=limit.split(":");
    parselimit=parselimit[0]*60+parselimit[1]*1;
    }
function beginrefresh(){
    if (!document.images)
        return;
    if (parselimit==1)
    window.location.reload();
    else{
        parselimit-=1;
        curmin=Math.floor(parselimit/60);
        cursec=parselimit%60;
        if (curmin!=0)
            curtime=curmin+"分"+cursec+"秒后重刷本页!";
        else
            curtime=cursec+"秒后重刷本页!";
        window.status=curtime;
        setTimeout("beginrefresh()",1000);
    }
}
window.onload=beginrefresh;
</script>

 

该方法,可以支持提示器的参数查询,但是每次都要手动确认,这个很不爽。

 

第三种,直接指定id去刷新:

原文链接:http://sites.google.com/site/technicalobiee/refresh-an-answer

In this case: HereLink('d:dashboard~p:htocnphpmvrb9omb~r:vqlr4imrh3dv3i1n','Refresh');

You can use it from any place within HTML as:
 
This is the way is what I used it in my custom application:
 
<script language="javascript"> 
</script> 
<body>
<P><SPAN class=GFPCaption>Min Year</SPAN> <SPAN class=GFPControl><SELECT id=yFrom onchange=jf_set_session_variable("YEAR_INI",value,"false");javascript:HereLink('d:dashboard~p:7al9b092q0abnd09~r:16m0dbuj2fggkk6t','Refresh');javascript:HereLink('d:dashboard~p:7al9b092q0abnd09~r:8cekuotg338gbjum','Refresh');  name=yFrom> 
<OPTION selected value=@1>@1</OPTION> 
<OPTION value=2009>2009</OPTION>
<OPTION value=2010>2010</OPTION>
<OPTION value=2011>2011</OPTION>
<OPTION value=2012>2012</OPTION>
</SELECT></SPAN>                                            
<SPAN class=GFPCaption>Max Year</SPAN> <SPAN class=GFPControl><SELECT id=yFrom onchange=jf_set_session_variable("YEAR_FIN",value,"false");HereLink('d:dashboard~p:htocnphpmvrb9omb~r:vqlr4imrh3dv3i1n','Refresh');javascript:HereLink('d:dashboard~p:htocnphpmvrb9omb~r:rg3pljmv9lq29gip','Refresh'); name=yFrom> 
<OPTION selected value=@2>@2</OPTION> 
<OPTION value=2009>2009</OPTION>
<OPTION value=2010>2010</OPTION>
<OPTION value=2011>2011</OPTION>
<OPTION value=2012>2012</OPTION>
</SELECT></SPAN> </P>
</body>
 
You can choose what to refresh:
 - Dashboard -> d:
 - Page -> p:
 - Request ->  r:
 - View -> v:
For example, to refresh a view:
'd:dashboard~p:htocnphpmvrb9omb~r:vqlr4imrh3dv3i1n~v:compoundView!1~v:tableView!1';
To know the id parameters (dashboard, page, request and view) you can see the Page code from the browser:
saw_3475_c_2.sViewID = 'd:dashboard~p:htocnphpmvrb9omb~r:vqlr4imrh3dv3i1n~v:compoundView!1~v:tableView!1';

针对列表中编号过长,导致下载到excel时最后一位变成0的科学计数法表示了,加上如下的样式可以控制“下载excel”时,保留原始数据,但是采用“下载数据”还是会丢数据,不是很完美的方案。
指定excle的格式:mso-number-format:"\@"