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 = ${参数二})
    

      

     三、参数自动查询

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

    纸上得来终觉浅,绝知此事要躬行。
  • 相关阅读:
    课程笔记:——Javascript 中的预解释1
    我的博客园开通了~
    scheduling algorithm
    jQuery实现全选,全不选,反选
    jQuery实现表格选中行变色
    程序员永远的鸡血
    大家好,欢迎来到我的博客,我们一起成长,见证奇迹!
    存储过程和触发器优缺点分析
    ECStore去掉Index.php的方法
    C# 编码与解码
  • 原文地址:https://www.cnblogs.com/cbugs/p/15320581.html
Copyright © 2011-2022 走看看