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

      

     三、参数自动查询

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

    纸上得来终觉浅,绝知此事要躬行。
  • 相关阅读:
    Maven最全指南,看了必懂(转载)
    MySQL:数据库优化
    关于 MyBatis 10 种通用的写法
    Redis 性能问题分析(转载)
    前端对于服务端渲染(SSR)的理解
    JS 中的编码和解码(encode和decode)
    SEO、SPA、SSR的区别关系详解
    VUE 项目路由的两种模式(hash、history)
    Chrome和IE浏览器的渲染过程区别
    对于前端缓存的理解(缓存机制和缓存类型)
  • 原文地址:https://www.cnblogs.com/cbugs/p/15320581.html
Copyright © 2020-2023  润新知