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 @@ -173,4 +173,9 @@ Column CID=0 heading_text="${column.caption}" center_heading explanation="${colu
width=${column.visible_width} text_size=60\
</#if>\
</#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>>;^

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

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

Loading…
Cancel
Save