diff --git a/src-modules/module/xcube/masken/21000_felderinfo.unl b/src-modules/module/xcube/masken/21000_felderinfo.unl index 1ec666b..5b6d0e7 100644 --- a/src-modules/module/xcube/masken/21000_felderinfo.unl +++ b/src-modules/module/xcube/masken/21000_felderinfo.unl @@ -46,3 +46,6 @@ and trim(F.table_name) || '.' || F.name in (select trim(tablename)||'.'||trim(fi 21025^Alter^39^0^0^140^80^1^char^30^0^12^<> select tid,name,sortnr from sichten where art in ('XCUBE-Alter-Sicht') order by 3,2;^^^ 21026^HZB-Note^40^0^0^140^80^1^char^30^0^12^<> select tid,name,sortnr from sichten where art in ('XCUBE-HZB-Note-Sicht') order by 3,2;^^^ 21027^Hörerstatus (intern)^43^0^0^140^80^1^char^30^0^12^<> select tid,name,sortnr from sichten where art in ('XCUBE-Hörerstatus-Sicht') order by 3,2;^^^ +21028^Spaltenvisualisierung^10000^0^0^140^80^1^char^30^0^1^<> select '_graph','Balken (horiz. linksb.)' from xdummy\ +union select '_graphbarright','Balken (horiz. rechtsb.)' from xdummy\ +union select '_graphbaralternating','Balken (horiz. rechtsb./linksb.)' from xdummy^^^ diff --git a/src-modules/module/xcube/masken/21000_masken_felder_bez.unl b/src-modules/module/xcube/masken/21000_masken_felder_bez.unl index 91e9b85..a7243d0 100644 --- a/src-modules/module/xcube/masken/21000_masken_felder_bez.unl +++ b/src-modules/module/xcube/masken/21000_masken_felder_bez.unl @@ -26,3 +26,4 @@ 21000^21025^ 21000^21026^ 21000^21027^ +21000^21028^ diff --git a/src-modules/module/xcube/masken/21000_maskeninfo.unl b/src-modules/module/xcube/masken/21000_maskeninfo.unl index 5e70a12..11764fb 100644 --- a/src-modules/module/xcube/masken/21000_maskeninfo.unl +++ b/src-modules/module/xcube/masken/21000_maskeninfo.unl @@ -142,6 +142,11 @@ select 'nicht relevant' from xdummy;\ <#if coldef.is_virtual?number=1||rowdef.is_virtual?number=1> <#return 1><#else> return <#return 0> \ \ \ +<#assign graph_col= "col" />\ +/* <#assign graph_col=<> /> */\ +\ +create temp table tmp_cellmax (maxvalue ${datatype} );\ +insert into tmp_cellmax values(0);\ \ <#if hasVirtualColumns()=1||kennzahlInRowOrCol()=1>\ select * into temp tmp_rohdaten from \ @@ -330,13 +335,28 @@ drop table if exists tmp_rohdaten;\ <#assign i=i+1/>\ update tmp_erg set c${i}=0 where c${i} is null; \ \ +<#assign lastcol=i />\ +\ +--Wenn Grafikfunktion eingeschaltet ist, wird Maximalwert ermittelt:\ +<#if i != 0 && graph_col != "col" >\ +\ +<#assign i=0/>\ + <#foreach spalte in ergspalten>\ + <#assign i=i+1/>\ + <#if i == lastcol>\ + update tmp_cellmax set maxvalue = (select max(c${i}) from tmp_erg) \ + where tmp_cellmax.maxvalue < (select max(c${i}) from tmp_erg) ;\ + \ +\ +\ +\ \ <#if "<>"="'ja'">\ -delete from tmp_erg where 1=1 \ +delete from tmp_erg where 1=1\ <#assign i=0/>\ <#foreach spalte in ergspalten>\ <#assign i=i+1/>\ - and c${i}=0 \ +and c${i}=0\ ;\ \ <#if "<>"="'institution'">\ @@ -351,16 +371,37 @@ update tmp_erg set name=replace(name,col1||' - ','');\ \ \ select \ - <#if rowdef.is_sicht>0>ebene,\ -name \ -<#if "<<2.Ansicht in Zeilen>>"!=""&&"<<2.Ansicht in Zeilen>>"!="<<2.Ansicht in Zeilen>>">,col2\ +<#if rowdef.is_sicht>0>\ + <#if graph_col=="col">\ + ebene,\ + <#else>\ + ebene as level, --bei Grafiken keine Ebenenanzeige\ + \ +\ +name\ +--TODO: wenn <<2.Ansicht in Zeilen>>"!="" dann ,col2\ <#assign i=0/>\ <#foreach spalte in ergspalten>\ <#assign i=i+1/>\ -,c${i}::${datatype} \ +<#if i != lastcol && graph_col != "col" >\ +<#if graph_col == "_graphbaralternating">\ +--bei symmetr. Balken jeder 2. Balken rechtsbündig\ + <#if i % 2 == 0>\ + , '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as _graph${i}\ + <#else>\ + , '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as _graphbarright${i}\ + \ +<#else>\ +, '' || c${i}::${datatype} || '|' || tmp_cellmax.maxvalue as ${graph_col}${i}\ +\ +\ +<#else>\ +, c${i}::${datatype} as col${i}\ +\ +\ \ \ -from tmp_erg order by sortnr;^--freemarker Template\ +from tmp_erg, tmp_cellmax order by sortnr;^--freemarker Template\ XIL List\ sizable_columns horizontal_scrolling\ drop_and_delete movable_columns\ @@ -389,4 +430,5 @@ Column CID=1 heading_text="${spalte.name}" center_heading\ row_selectable heading_platform readonly explanation="Ausprägung ${spalte.name}"\ width=12\ \ -@@@^Altersgruppe^Anzahl^Dynamische Darstellung von Studierendenzahlen^drop table tmp_erg;^^3^700^360^0^1^^ +@@@^Altersgruppe^Anzahl^Dynamische Darstellung von Studierendenzahlen^drop table tmp_erg;\ +drop table tmp_cellmax;^ ^3^700^360^0^1^ ^