zoukankan      html  css  js  c++  java
  • finereport 数据分析预览 居中 参数分割 自动查询

    一、页面居中:

         模板:数据分析设置-》事件设置》加载结束

               

    ms = $('.html-content').length; //判断是否为多sheet
    if (ms != 0) {
    	//多sheet
    	ff = $(".frozen-table", $('.html-content:visible')).length //判断当前sheet是否有冻结
    	if (ff == 0) {
    		//未冻结
    		var slmargin = ($(".content-container").width() - $(".sheet-container div:first-child", $('.html-content:visible')).width()) / 2;
    		if (slmargin > 0) {
    			$('.sheet-container', $('.html-content:visible')).css('margin-left', slmargin);
    			//$(".x-table",$('.html-content:visible')).css('left',slmargin);
    			$(window).resize();
    		}
    	} else {
    		//冻结
    		var slmargin = ($(".content-container").width() - $('.x-table', $('#frozen-center'), $('.html-content:visible')).width() - $('.x-table', $('#frozen-west'), $('.html-content:visible')).width()) / 2;
    		if (slmargin > 0) {
    			$('.sheet-container', $('.html-content:visible')).css('margin-left', slmargin);
    			$(window).resize();
    		}
    	}
    } else {
    	ff = $(".frozen-table").length //判断当前sheet是否有冻结
    	//单sheet
    	if (ff == 0) {
    		//未冻结
    		slmargin = ($(".content-container").width() - $(".sheet-container div:first-child").width()) / 2;
    		if (slmargin > 0) {
    			$('.sheet-container').css('margin-left', slmargin);
    			//$(".x-table").css('left',slmargin);
    			$(window).resize();
    		}
    	} else {
    		//冻结
    		slmargin = ($(".content-container").width() - $('.x-table', $('#frozen-center')).width() - $('.x-table', $('#frozen-west')).width()) / 2;
    		if (slmargin > 0) {
    			$('.sheet-container').css('margin-left', slmargin);
    			$(window).resize();
    		}
    	}
    }
    

      

      

    二、钻取子报表,sql参数需要分割:适用于参数不是很多的时候

      

    参数一 =  IF(FIND(';',T5) !=0,MID(T5,1,FIND(';',T5)-1),T5)
    参数二 =   IF(FIND(';',T5) !=0,MID(T5,FIND(';',T5)+1),T5)

    子报表接受sql  

    select *  from table a  where (id = ${参数一} or id = ${参数二})
    

      

     三、参数自动查询

          点击参数面板右侧空白处取消勾选点击查询前不显示报表内容

    纸上得来终觉浅,绝知此事要躬行。
  • 相关阅读:
    不能执行已释放的Script的代码(ie错误)
    javascript数组
    Jquery遍历方法
    Jquery选择器汇总
    使用xmlHttprequest 发送异步请求(Ajax核心对象)
    不使用局部变量和for循环或其它循环打印出如m=19,n=2結果为2 4 8 16 16 8 4 2形式的串
    解决Js跨域访问的问题
    Oracle 第一天
    计算机图形学1——绪论
    数据库
  • 原文地址:https://www.cnblogs.com/cbugs/p/15320581.html
Copyright © 2011-2022 走看看