|
|
|
@ -1,4 +1,4 @@ |
|
|
|
96^RPTA-Makros^<#macro rpta_column_layout_fuellen>\ |
|
|
|
841^RPTA-Makros^<#macro rpta_column_layout_fuellen>\ |
|
|
|
CREATE temp TABLE tmp_rpta_column\ |
|
|
|
CREATE temp TABLE tmp_rpta_column\ |
|
|
|
(\ |
|
|
|
(\ |
|
|
|
uniquename varchar(255) NOT NULL,\ |
|
|
|
uniquename varchar(255) NOT NULL,\ |
|
|
|
@ -368,7 +368,9 @@ drop TABLE tmp_rpta_column2layout;\ |
|
|
|
--Zuerst leere Zieltabelle anlegen:\ |
|
|
|
--Zuerst leere Zieltabelle anlegen:\ |
|
|
|
select \ |
|
|
|
select \ |
|
|
|
<#foreach column in columns>\ |
|
|
|
<#foreach column in columns>\ |
|
|
|
|
|
|
|
<#if column.coltype!="preparingColumn">\ |
|
|
|
${column.targetfieldname},\ |
|
|
|
${column.targetfieldname},\ |
|
|
|
|
|
|
|
</#if>\ |
|
|
|
</#foreach>\ |
|
|
|
</#foreach>\ |
|
|
|
null::integer as sortnr\ |
|
|
|
null::integer as sortnr\ |
|
|
|
into temp tmp_stud3\ |
|
|
|
into temp tmp_stud3\ |
|
|
|
@ -397,11 +399,14 @@ drop TABLE tmp_rpta_column2layout;\ |
|
|
|
<#assign sortnr=sortnr+1>\ |
|
|
|
<#assign sortnr=sortnr+1>\ |
|
|
|
insert into tmp_stud3(\ |
|
|
|
insert into tmp_stud3(\ |
|
|
|
<#foreach column in columns>\ |
|
|
|
<#foreach column in columns>\ |
|
|
|
|
|
|
|
<#if column.coltype!="preparingColumn">\ |
|
|
|
${column.targetfieldname},\ |
|
|
|
${column.targetfieldname},\ |
|
|
|
|
|
|
|
</#if>\ |
|
|
|
</#foreach>\ |
|
|
|
</#foreach>\ |
|
|
|
sortnr)\ |
|
|
|
sortnr)\ |
|
|
|
select\ |
|
|
|
select\ |
|
|
|
<#foreach column in columns>\ |
|
|
|
<#foreach column in columns>\ |
|
|
|
|
|
|
|
<#if column.coltype!="preparingColumn">\ |
|
|
|
<#if column.targetfieldname=treeColumnTargetFieldname>\ |
|
|
|
<#if column.targetfieldname=treeColumnTargetFieldname>\ |
|
|
|
'${einElement.name}',\ |
|
|
|
'${einElement.name}',\ |
|
|
|
<#elseif column.targetfieldname="ebene">\ |
|
|
|
<#elseif column.targetfieldname="ebene">\ |
|
|
|
@ -418,6 +423,7 @@ drop TABLE tmp_rpta_column2layout;\ |
|
|
|
<#else>\ |
|
|
|
<#else>\ |
|
|
|
null,\ |
|
|
|
null,\ |
|
|
|
</#if>\ |
|
|
|
</#if>\ |
|
|
|
|
|
|
|
</#if>\ |
|
|
|
</#foreach>\ |
|
|
|
</#foreach>\ |
|
|
|
--(${einElement.level}*10000) + ${sortnr} as sortnr\ |
|
|
|
--(${einElement.level}*10000) + ${sortnr} as sortnr\ |
|
|
|
${sortnr} *10000 as sortnr\ |
|
|
|
${sortnr} *10000 as sortnr\ |
|
|
|
@ -432,7 +438,9 @@ drop TABLE tmp_rpta_column2layout;\ |
|
|
|
<#assign sortnr=sortnr+1>\ |
|
|
|
<#assign sortnr=sortnr+1>\ |
|
|
|
insert into tmp_stud3(\ |
|
|
|
insert into tmp_stud3(\ |
|
|
|
<#foreach column in columns>\ |
|
|
|
<#foreach column in columns>\ |
|
|
|
|
|
|
|
<#if column.coltype!="preparingColumn">\ |
|
|
|
${column.targetfieldname},\ |
|
|
|
${column.targetfieldname},\ |
|
|
|
|
|
|
|
</#if>\ |
|
|
|
</#foreach>\ |
|
|
|
</#foreach>\ |
|
|
|
sortnr)\ |
|
|
|
sortnr)\ |
|
|
|
select\ |
|
|
|
select\ |
|
|
|
@ -455,7 +463,15 @@ drop TABLE tmp_rpta_column2layout;\ |
|
|
|
&& (column.coltype == "logicalColumn" || column.coltype == "lookupColumn" || column.coltype == "physicalColumn")> \ |
|
|
|
&& (column.coltype == "logicalColumn" || column.coltype == "lookupColumn" || column.coltype == "physicalColumn")> \ |
|
|
|
sum(${column.targetfieldname}) as ${column.targetfieldname},\ |
|
|
|
sum(${column.targetfieldname}) as ${column.targetfieldname},\ |
|
|
|
<#else>\ |
|
|
|
<#else>\ |
|
|
|
|
|
|
|
<#if (column.is_aggregate==0 && column.coltype!="preparingColumn" && column.coltype!="processingColumn") || column.coltype=="computedColumn"> \ |
|
|
|
${column.targetfieldname},\ |
|
|
|
${column.targetfieldname},\ |
|
|
|
|
|
|
|
<#elseif column.is_aggregate==0 && column.coltype=="processingColumn"> \ |
|
|
|
|
|
|
|
<#if column.colfunction?has_content>\ |
|
|
|
|
|
|
|
${column.colfunction} as ${column.targetfieldname},\ |
|
|
|
|
|
|
|
<#else>\ |
|
|
|
|
|
|
|
${column.srcfieldname} as ${column.targetfieldname},\ |
|
|
|
|
|
|
|
</#if>\ |
|
|
|
|
|
|
|
</#if>\ |
|
|
|
</#if>\ |
|
|
|
</#if>\ |
|
|
|
</#foreach>\ |
|
|
|
</#foreach>\ |
|
|
|
${sortnr} *10000 --(${einElement.level}*10000) + ${sortnr} as sortnr\ |
|
|
|
${sortnr} *10000 --(${einElement.level}*10000) + ${sortnr} as sortnr\ |
|
|
|
@ -521,10 +537,15 @@ drop TABLE tmp_rpta_column2layout;\ |
|
|
|
<#if column.targetfieldname !=treeColumnTargetFieldnameParam\ |
|
|
|
<#if column.targetfieldname !=treeColumnTargetFieldnameParam\ |
|
|
|
&& column.targetfieldname!="ebene"\ |
|
|
|
&& column.targetfieldname!="ebene"\ |
|
|
|
&& column.is_aggregate==0 \ |
|
|
|
&& column.is_aggregate==0 \ |
|
|
|
>\ |
|
|
|
&& column.coltype!="preparingColumn">\ |
|
|
|
<#assign ret=column.targetfieldname />\ |
|
|
|
<#if column?is_first>\ |
|
|
|
|
|
|
|
<#assign ret=column.targetfieldname/>\ |
|
|
|
|
|
|
|
<#else>\ |
|
|
|
|
|
|
|
<#assign ret=ret + "," + column.targetfieldname/>\ |
|
|
|
|
|
|
|
</#if>\ |
|
|
|
</#if>\ |
|
|
|
</#if>\ |
|
|
|
</#foreach>\ |
|
|
|
</#foreach>\ |
|
|
|
|
|
|
|
<#assign ret=ret + "" />\ |
|
|
|
<#return ret />\ |
|
|
|
<#return ret />\ |
|
|
|
</#function>\ |
|
|
|
</#function>\ |
|
|
|
<#macro rpta_column_fuellen>\ |
|
|
|
<#macro rpta_column_fuellen>\ |
|
|
|
|