bug_x

导航

 

一、页面居中:

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

           

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

  

 三、参数自动查询

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

 

 

posted on 2021-09-22 16:48  bug_x  阅读(314)  评论(0编辑  收藏  举报