Browse Source

Neuer Spaltentyp Sicht Bugfix #15

master
Daniel Quathamer 2 weeks ago
parent
commit
d85525038f
  1. 5
      src-modules/module/rpta/masken/48000_maskeninfo.unl
  2. 33
      src-modules/module/rpta/schluesseltabellen/fm_templates.unl

5
src-modules/module/rpta/masken/48000_maskeninfo.unl

@ -173,4 +173,9 @@ Column CID=0 heading_text="${column.caption}" center_heading explanation="${colu
width=${column.visible_width} text_size=60\ width=${column.visible_width} text_size=60\
</#if>\ </#if>\
</#foreach>\ </#foreach>\
<#if 1=0>\
Column CID=0 heading_text="sortnr" center_heading explanation=""\
row_selectable heading_platform readonly\
width=5 text_size=60\
</#if>\
@@@^Studienfach^Anzahl bzw. Anteil^Datenblatt Studierendenstatistik^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ @@@^Studienfach^Anzahl bzw. Anteil^Datenblatt Studierendenstatistik^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^

33
src-modules/module/rpta/schluesseltabellen/fm_templates.unl

@ -269,6 +269,7 @@ drop TABLE tmp_rpta_column2layout;\
\ \
<#macro rpta_interpret_column_layout nonvirtualTableFilter>\ <#macro rpta_interpret_column_layout nonvirtualTableFilter>\
<#assign columnLayoutHasTreeColumn=0 />\ <#assign columnLayoutHasTreeColumn=0 />\
\
<#assign treeColumnSrcFieldname="" />\ <#assign treeColumnSrcFieldname="" />\
<#assign treeColumnTargetFieldname="" />\ <#assign treeColumnTargetFieldname="" />\
<#assign treeColumnMaskFieldname="" />\ <#assign treeColumnMaskFieldname="" />\
@ -361,6 +362,8 @@ drop TABLE tmp_rpta_column2layout;\
where 1=1\ where 1=1\
;\ ;\
<#if columnLayoutHasTreeColumn==1>\ <#if columnLayoutHasTreeColumn==1>\
<#assign columnLayoutWithTreeColumnAdditionalGrouping=sichtHasAdditionalGrouping(treeColumnTargetFieldname) />\
\
--Sichtaufbau:\ --Sichtaufbau:\
--Zuerst leere Zieltabelle anlegen:\ --Zuerst leere Zieltabelle anlegen:\
select \ select \
@ -389,7 +392,7 @@ drop TABLE tmp_rpta_column2layout;\
\ \
<#foreach einElement in .vars[treeColumnMaskFieldname].elements>\ <#foreach einElement in .vars[treeColumnMaskFieldname].elements>\
<@addcomment "${einElement.name}"/>\ <@addcomment "${einElement.name}"/>\
<#if einElement.level &lt; maxEbene >\ \
--zuerst Summenzeile:\ --zuerst Summenzeile:\
<#assign sortnr=sortnr+1>\ <#assign sortnr=sortnr+1>\
insert into tmp_stud3(\ insert into tmp_stud3(\
@ -416,13 +419,16 @@ drop TABLE tmp_rpta_column2layout;\
null::char(1),\ null::char(1),\
</#if>\ </#if>\
</#foreach>\ </#foreach>\
(${einElement.level}*10000) + ${sortnr} as sortnr\ --(${einElement.level}*10000) + ${sortnr} as sortnr\
${sortnr} *10000 as sortnr\
from tmp_stud2\ from tmp_stud2\
where ${treeColumnSrcFieldname} in ${einElement.subkeys}\ where ${treeColumnSrcFieldname} in ${einElement.subkeys}\
\ \
;\ ;\
</#if>\ \
--dann darunter die Werte:\ --Unterste Ebene die Werte:\
<#if columnLayoutWithTreeColumnAdditionalGrouping != "" \
&& einElement.level == maxEbene >\
<#assign sortnr=sortnr+1>\ <#assign sortnr=sortnr+1>\
insert into tmp_stud3(\ insert into tmp_stud3(\
<#foreach column in columns>\ <#foreach column in columns>\
@ -434,7 +440,7 @@ drop TABLE tmp_rpta_column2layout;\
<#if column.targetfieldname=treeColumnTargetFieldname>\ <#if column.targetfieldname=treeColumnTargetFieldname>\
'${einElement.name}',\ '${einElement.name}',\
<#elseif column.targetfieldname="ebene">\ <#elseif column.targetfieldname="ebene">\
<#if einElement.level &lt; maxEbene >\ <#if einElement.level == maxEbene >\
${einElement.level+ 1},\ ${einElement.level+ 1},\
<#else>\ <#else>\
${einElement.level},\ ${einElement.level},\
@ -452,11 +458,12 @@ drop TABLE tmp_rpta_column2layout;\
${column.targetfieldname},\ ${column.targetfieldname},\
</#if>\ </#if>\
</#foreach>\ </#foreach>\
(${einElement.level}*10000) + ${sortnr} as sortnr\ ${sortnr} *10000 --(${einElement.level}*10000) + ${sortnr} as sortnr\
from tmp_stud2\ from tmp_stud2\
where s_tid_stg in ${einElement.subkeys}\ where s_tid_stg in ${einElement.subkeys}\
group by ca12staat_str\ group by ${columnLayoutWithTreeColumnAdditionalGrouping}\
;\ ;\
</#if>\
</#foreach>\ </#foreach>\
\ \
drop table tmp_stud2;\ drop table tmp_stud2;\
@ -508,6 +515,18 @@ drop TABLE tmp_rpta_column2layout;\
\ \
</#macro>\ </#macro>\
\ \
<#function sichtHasAdditionalGrouping treeColumnTargetFieldnameParam>\
<#assign ret="" />\
<#foreach column in columns>\
<#if column.targetfieldname !=treeColumnTargetFieldnameParam\
&& column.targetfieldname!="ebene"\
&& column.is_aggregate==0 \
>\
<#assign ret=column.targetfieldname />\
</#if>\
</#foreach>\
<#return ret />\
</#function>\
<#macro rpta_column_fuellen>\ <#macro rpta_column_fuellen>\
CREATE temp TABLE tmp_rpta_column\ CREATE temp TABLE tmp_rpta_column\
(\ (\

Loading…
Cancel
Save