Browse Source

Studierendenmasken zusammenführen; chart2layout; Feldvorbelegung über Grafikausgabe

master
Imo John 5 hours ago
parent
commit
9d32d9b164
  1. 28
      src-modules/module/viz/conf/viz.xml
  2. 12
      src-modules/module/viz/masken/44570_felderinfo.unl
  3. 2
      src-modules/module/viz/masken/44570_masken_felder_bez.unl
  4. 43
      src-modules/module/viz/masken/44780_felderinfo.unl
  5. 1
      src-modules/module/viz/masken/44780_maske_system_bez.unl
  6. 17
      src-modules/module/viz/masken/44780_masken_felder_bez.unl
  7. 1
      src-modules/module/viz/masken/44780_maskeninfo.unl
  8. 1
      src-modules/module/viz/masken/44780_sachgeb_maske_bez.unl
  9. 43
      src-modules/module/viz/masken/44810_felderinfo.unl
  10. 1
      src-modules/module/viz/masken/44810_maske_system_bez.unl
  11. 17
      src-modules/module/viz/masken/44810_masken_felder_bez.unl
  12. 1
      src-modules/module/viz/masken/44810_maskeninfo.unl
  13. 1
      src-modules/module/viz/masken/44810_sachgeb_maske_bez.unl
  14. 120
      src-modules/module/viz/schluesseltabellen/chart2layout_fuellen.sql
  15. 94
      src-modules/module/viz/schluesseltabellen/viz_chart.unl

28
src-modules/module/viz/conf/viz.xml

@ -719,6 +719,34 @@ caption="Staaten (Geocodes)" releaseUnload="demo">
</table> </table>
--> -->
<table name="viz_chart2layout" thema="Visualisierungen" typ="Datentabelle"
releaseUnload="demo">
<description>Dashboard-Tab Metadaten</description>
<columns>
<column name="tid" type="SERIAL" size="" default="" notnull="true" description="tid" isKey="true"/>
<column name="chart_id" type="INTEGER" size="255" default="" isKey="true" notnull="true" description="Grafik" />
<column name="layout_id" type="INTEGER" size="255" default="" notnull="" description="Spaltenlayout" />
<column name="caption" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" />
<column name="sortnr" type="SMALLINT" size="255" default="0" notnull="false" description="Sortiernr." sortable="true" />
</columns>
<primaryKeys><rs>
<row>
<fld name='table_cat'>superx</fld>
<fld name='table_schem'>superx</fld>
<fld name='table_name'>viz_chart2layout</fld>
<fld name='column_name'>tid</fld>
<fld name='key_seq'>1</fld>
<fld name='pk_name'>viz_chart2layout_pk</fld>
</row>
</rs>
</primaryKeys>
<indexes>
</indexes>
</table>
<views> <views>
<view name="viz_property_dimension_measure"> <view name="viz_property_dimension_measure">
<description>View Eigenschaften für Dimensionen und Maße</description> <description>View Eigenschaften für Dimensionen und Maße</description>

12
src-modules/module/viz/masken/44570_felderinfo.unl

@ -29,10 +29,10 @@ order by tid DESC;^Eintrag^<<SQL>> select tid,eintrag from semester where today(
44588^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ 44588^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\
caption\ caption\
FROM rpta_column_layout \ FROM rpta_column_layout \
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat_dashboard'\ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat_dashboard','sos_stud_astat')\
and R.systeminfo_id=7)\ and R.systeminfo_id=7)\
order by sortnr, caption\ order by sortnr, caption\
;^^<<SQL>>SELECT uniquename,\ ;^hidden^<<SQL>>SELECT uniquename,\
caption\ caption\
FROM rpta_column_layout \ FROM rpta_column_layout \
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat_dashboard'\ where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat_dashboard'\
@ -42,3 +42,11 @@ and R.systeminfo_id=7) and uniquename='sos_stud_sem_dashboard';^
44591^Abschluss^35^0^0^100^200^3^char^1500^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Abschluss-Sicht' order by 3,2;^ ^ ^ 44591^Abschluss^35^0^0^100^200^3^char^1500^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Abschluss-Sicht' order by 3,2;^ ^ ^
44592^viz_label_Studiengang^29^350^-1^150^180^1^char^200^0^8^^{InputCheck:matrikelnummern}^^ 44592^viz_label_Studiengang^29^350^-1^150^180^1^char^200^0^8^^{InputCheck:matrikelnummern}^^
44593^viz_label_koepfe_faelle^0^350^-1^150^180^1^char^200^0^8^^{InputCheck:matrikelnummern}^^ 44593^viz_label_koepfe_faelle^0^350^-1^150^180^1^char^200^0^8^^{InputCheck:matrikelnummern}^^
44594^_customVorbelegung^40^0^0^100^100^1^char^5000^0^1^<<SQL>> select 'splitFields(''Grafikausgabe'')','Ausgabe';^{InputCheck:disabled}^<<SQL>> select 'splitFields(''Grafikausgabe'')','Ausgabe';^
44595^Grafikausgabe^1000^300^-1^170^150^1^char^30^0^1^<<SQL>> select 'Grafik='||C.uniquename||'*Spaltenlayout='||L.uniquename, CL.caption\
from viz_chart C, viz_chart2layout CL, rpta_column_layout L\
where C.tid=CL.chart_id\
and CL.layout_id=L.tid\
and C.maskeninfo_id=44570 \
order by 2\
;^ ^ ^

2
src-modules/module/viz/masken/44570_masken_felder_bez.unl

@ -20,3 +20,5 @@
44570^44591^ 44570^44591^
44570^44592^ 44570^44592^
44570^44593^ 44570^44593^
44570^44594^
44570^44595^

43
src-modules/module/viz/masken/44780_felderinfo.unl

@ -1,43 +0,0 @@
44780^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\
caption\
FROM rpta_column_layout \
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat_dashboard')\
and R.systeminfo_id=7)\
and uniquename in ('sos_stud_geschl_dashboard','sos_stud_sem_dashboard','sos_stud_dashboard_jahr')\
order by sortnr, caption\
;^ ^<<SQL>>SELECT uniquename,\
caption\
FROM rpta_column_layout \
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat_dashboard')\
and R.systeminfo_id=7)\
and uniquename in ('sos_stud_abgrp_dashboard')\
order by sortnr, caption limit 1\
;^
44781^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<<SQL>> --freemarker template \
select tid, eintrag from semester \
<#if K_VIZ_ZEITR_SEM_ANZ?exists>\
where sem_beginn >= today()-(182*${K_VIZ_ZEITR_SEM_ANZ} )\
</#if>\
and sem_beginn <=today()\
order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^
44782^Fächer^30^0^0^130^200^6^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^
44783^Abschluss^40^0^0^100^200^3^char^1500^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Abschluss-Sicht' order by 3,2;^ ^ ^
44784^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^13^^ ^ ^
44785^Grafik^4000^300^-1^170^150^1^char^30^0^1^<<SQL>> select uniquename, caption from viz_chart where maskeninfo_id=44780 and chart_active=1 order by 2;^ ^<<SQL>> select uniquename, caption from viz_chart where maskeninfo_id=44780 and chart_active=1 order by 2 limit 1;^
44786^Nur Endsemester^1000^0^0^140^80^1^integer^30^0^1^<<SQL>> select 1,'ja' from xdummy^Eintrag^ ^
44787^Bis Semester^20^350^-1^140^80^1^integer^30^0^1^<<SQL>> --freemarker template \
select tid, eintrag from semester \
<#if K_VIZ_ZEITR_SEM_ANZ?exists>\
where sem_beginn >= today()-(182*${K_VIZ_ZEITR_SEM_ANZ} )\
</#if>\
and sem_beginn <=today()\
order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^
44788^Staatsangehörigkeit^150^0^0^140^150^10^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^ ^ ^
44789^Studiengang^25^0^0^140^150^50^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^
44790^tablestylesheet^150^0^0^100^100^1^char^255^1^1^<<SQL>> select filename,caption from sx_stylesheets S, sx_mask_style M where S.tid=M.stylesheet_id and M.maskeninfo_id=44780 order by ord^ ^<<SQL>> select filename,caption from sx_stylesheets S, sx_mask_style M where S.tid=M.stylesheet_id and M.maskeninfo_id=44780 order by ord limit 1^
44791^Stichtag^23^330^-1^130^100^1^sql^30^1^1^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^ ^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende' and appl_key='0';^
44792^Hörerstatus^200^330^-1^140^150^1^sql^30^0^1^<<SQL>> select apnr, eintrag from hoererstatus order by 2^ ^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^
44793^Jahr^110^0^0^140^80^1^integer^30^0^13^ ^ ^ ^
44794^Semestertyp^22^350^-1^140^80^1^integer^255^0^1^<<SQL>> select 1,'nur Sommersemester' from xdummy union select 2,'nur Wintersemester' from xdummy^ ^<<SQL>> select 2,'nur Wintersemester' from xdummy^
44798^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<<SQL>> select apnr, eintrag from koepfe_oder_faelle order by 2^apnr, eintrag^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^
44802^Geschlecht^110^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^

1
src-modules/module/viz/masken/44780_maske_system_bez.unl

@ -1 +0,0 @@
44780^320^

17
src-modules/module/viz/masken/44780_masken_felder_bez.unl

@ -1,17 +0,0 @@
44780^44780^
44780^44781^
44780^44782^
44780^44783^
44780^44784^
44780^44785^
44780^44786^
44780^44787^
44780^44788^
44780^44789^
44780^44790^
44780^44791^
44780^44792^
44780^44793^
44780^44794^
44780^44798^
44780^44802^

1
src-modules/module/viz/masken/44780_maskeninfo.unl

@ -1 +0,0 @@
44780^Studierende nach Abschluss (Zeitreihe)^<sximport>select select_stmt from maskeninfo where tid=48000</sximport>^<sximport>select xil_proplist from maskeninfo where tid=48000</sximport>^Studienfach^Anzahl bzw. Anteil^Ausgabe der Studierenden nach Fakultät mit verschiedenen Visualisierungen (z.B. Tortendiagramm)^<sximport>select cleanup_stmt from maskeninfo where tid=48000</sximport>^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where uniquename=<<Spaltenlayout>>;^

1
src-modules/module/viz/masken/44780_sachgeb_maske_bez.unl

@ -1 +0,0 @@
16^44780^

43
src-modules/module/viz/masken/44810_felderinfo.unl

@ -1,43 +0,0 @@
44810^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\
caption\
FROM rpta_column_layout \
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat_dashboard')\
and R.systeminfo_id=7)\
and uniquename in ('sos_stud_geschl_dashboard')\
order by sortnr, caption\
;^^<<SQL>>SELECT uniquename,\
caption\
FROM rpta_column_layout \
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat_dashboard')\
and R.systeminfo_id=7)\
and uniquename in ('sos_stud_geschl_dashboard')\
order by sortnr, caption limit 1\
;^
44811^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<<SQL>> --freemarker template \
select tid, eintrag from semester \
<#if K_VIZ_ZEITR_SEM_ANZ?exists>\
where sem_beginn >= today()-(182*${K_VIZ_ZEITR_SEM_ANZ} )\
</#if>\
and sem_beginn <=today()\
order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^
44812^Fächer^30^0^0^130^200^6^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^
44813^Abschluss^7^0^0^100^200^3^char^1500^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Abschluss-Sicht' order by 3,2;^ ^ ^
44814^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^13^^ ^ ^
44815^Grafik^4000^300^-1^170^150^1^char^30^0^1^<<SQL>> select uniquename, caption from viz_chart where maskeninfo_id=44810 order by 2;^ ^<<SQL>> select uniquename, caption from viz_chart where maskeninfo_id=44810 order by 2 limit 1;^
44816^Nur Endsemester^1000^0^0^140^80^1^integer^30^0^1^<<SQL>> select 1,'ja' from xdummy^Eintrag^ ^
44817^Bis Semester^20^350^-1^140^80^1^integer^30^0^1^<<SQL>> --freemarker template \
select tid, eintrag from semester \
<#if K_VIZ_ZEITR_SEM_ANZ?exists>\
where sem_beginn >= today()-(182*${K_VIZ_ZEITR_SEM_ANZ} )\
</#if>\
and sem_beginn <=today()\
order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^
44818^Staatsangehörigkeit^150^0^0^140^150^10^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^ ^ ^
44819^Studiengang^25^0^0^140^150^50^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^
44820^tablestylesheet^150^0^0^100^100^1^char^255^1^1^<<SQL>> select filename,caption from sx_stylesheets S, sx_mask_style M where S.tid=M.stylesheet_id and M.maskeninfo_id=44810 order by ord^ ^<<SQL>> select filename,caption from sx_stylesheets S, sx_mask_style M where S.tid=M.stylesheet_id and M.maskeninfo_id=44810 order by ord limit 1^
44821^Stichtag^23^330^-1^130^100^1^sql^30^1^1^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^ ^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende' and appl_key='0';^
44822^Hörerstatus^200^330^-1^140^150^1^sql^30^0^1^<<SQL>> select apnr, eintrag from hoererstatus order by 2^apnr, eintrag^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^
44823^Jahr^110^0^0^140^80^1^integer^30^0^13^ ^ ^ ^
44824^Semestertyp^22^350^-1^140^80^1^integer^255^0^1^<<SQL>> select 1,'nur Sommersemester' from xdummy union select 2,'nur Wintersemester' from xdummy^ ^<<SQL>> select 2,'nur Wintersemester' from xdummy^
44828^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<<SQL>> select apnr, eintrag from koepfe_oder_faelle order by 2^apnr, eintrag^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^
44832^Geschlecht^110^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^

1
src-modules/module/viz/masken/44810_maske_system_bez.unl

@ -1 +0,0 @@
44810^320^

17
src-modules/module/viz/masken/44810_masken_felder_bez.unl

@ -1,17 +0,0 @@
44810^44810^
44810^44811^
44810^44812^
44810^44813^
44810^44814^
44810^44815^
44810^44816^
44810^44817^
44810^44818^
44810^44819^
44810^44820^
44810^44821^
44810^44822^
44810^44823^
44810^44824^
44810^44828^
44810^44832^

1
src-modules/module/viz/masken/44810_maskeninfo.unl

@ -1 +0,0 @@
44810^Studierende nach Geschlecht (Zeitreihe)^<sximport>select select_stmt from maskeninfo where tid=48000</sximport>^<sximport>select xil_proplist from maskeninfo where tid=48000</sximport>^Studienfach^Anzahl bzw. Anteil^Ausgabe der Studierenden nach Geschlecht in verschiedenen Visualisierungen (z.B. Tortendiagramm)^<sximport>select cleanup_stmt from maskeninfo where tid=48000</sximport>^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where uniquename=<<Spaltenlayout>>;^

1
src-modules/module/viz/masken/44810_sachgeb_maske_bez.unl

@ -1 +0,0 @@
16^44810^

120
src-modules/module/viz/schluesseltabellen/chart2layout_fuellen.sql

@ -0,0 +1,120 @@
--Freemarker Template
--Achtung: Macro fügt Inhalte ein
--Bitte nur Freemarker Variablen füllen
<#assign chart2layout = [
{"chart":"simplePivotTable_44720_absolv_rsz", "layout":"rpta_sos_lab_aggr_in_rsz_jahr", "caption":"", "sortnr":"20"},
{"chart":"ABSOLV_RSZ_JAHR_BAR", "layout":"rpta_sos_lab_aggr_in_rsz_jahr", "caption":"", "sortnr":"20"},
{"chart":"ABSOLV_SEM_LINE", "layout":"rpta_sos_lab_aggr_sem", "caption":"", "sortnr":"20"},
{"chart":"ABSOLV_RSZ_SEM_BAR", "layout":"rpta_sos_lab_aggr_in_rsz_sem", "caption":"", "sortnr":"20"},
{"chart":"simplePivotTable_44720_abgrp_jahr", "layout":"rpta_sos_lab_aggr_abgrp_jahr", "caption":"", "sortnr":"20"},
{"chart":"ABSOLV_ABGRP_JAHR_AREA", "layout":"rpta_sos_lab_aggr_abgrp_jahr", "caption":"", "sortnr":"20"},
{"chart":"simplePivotTable_44720_absolv", "layout":"rpta_sos_lab_aggr_jahr", "caption":"", "sortnr":"20"},
{"chart":"ABSOLV_SEM_JAHR", "layout":"rpta_sos_lab_aggr_jahr", "caption":"", "sortnr":"20"},
{"chart":"ABSOLV_ABGRP_SEM_AREA", "layout":"rpta_sos_lab_aggr_abgrp_sem", "caption":"", "sortnr":"20"},
{"chart":"STUDANF_ABGRP_BAR_Y_ECHART", "layout":"sos_stud_abgrp_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_LEHRAMT_DONUT", "layout":"sos_stud_abgrp_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_ALTER_BOXPLOT_H", "layout":"sos_stud_nach_alter", "caption":"", "sortnr":"20"},
{"chart":"STUD_BILDUNGSTYP_DONUT", "layout":"sos_stud_bildungstyp_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_FAK_ABGRP_STG_SUNBURST", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUDANF_FAK_PIE", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUDANF_FAK_KURZ_DONUT_JB", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUDANF_FAK_BAR", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUDANF_FAK_BAR_X_ECHART", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUDANF_FAK_BAR_Y_ECHART", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"hms_torte_stud_fak", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_FAK_KURZ_PIE", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_FAK_KURZ_DONUT", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_FAK_KURZ_DONUT_JB", "layout":"sos_stud_fak_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_GESCHL_W_DONUT", "layout":"sos_stud_geschl_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_GESCHL_W_PIE", "layout":"sos_stud_geschl_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_GESCHL_W_DONUT_JB", "layout":"sos_stud_geschl_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUDANF_HZB_LAND_BAR", "layout":"sos_stud_hzb_bland_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_STAAT", "layout":"sos_stud_hzb_staat", "caption":"Studierende nach Staat der HZB", "sortnr":"20"},
{"chart":"STUD_STAAT", "layout":"sos_stud_ca12_staat", "caption":"Studierende nach Staatsangehörigkeit", "sortnr":"20"},
{"chart":"simplePivotTable_44570_jahr", "layout":"sos_stud_dashboard_jahr", "caption":"", "sortnr":"20"},
{"chart":"STUDANF_JAHR_LINE", "layout":"sos_stud_dashboard_jahr", "caption":"", "sortnr":"20"},
{"chart":"simplePivotTable_44570", "layout":"sos_stud_sem_dashboard", "caption":"", "sortnr":"20"},
{"chart":"STUD_SEM_LINE", "layout":"sos_stud_sem_dashboard", "caption":"", "sortnr":"20"}
] />
--Achtung: ab hier nicht ändern, Mutterdatei ist $SUPERX_DIR/db/module/sos/schluesseltabellen/sx_stylesheets_fuellen.sql
<@chart2layout_insert
m_chart2layout=chart2layout
/>
<#macro chart2layout_insert m_chart2layout>
--Sicherstellen, dass keine Duplikate vorkommen:
--####################################################################################################
<#foreach c2l in m_chart2layout>
delete from viz_chart2layout where chart_id in (select tid from viz_chart where uniquename ='${c2l.chart}') and layout_id in (select tid from rpta_column_layout where uniquename ='${c2l.layout}');
</#foreach>
-- chart2layout füllen
--####################################################################################################
create temp table tmp_chart2layout (
tid serial not null,
chart_id INTEGER ,
layout_id INTEGER,
caption varchar(255),
sortnr smallint
);
create temp table tmp_hilf (tid integer);
insert into tmp_hilf select max(tid) from viz_chart2layout;
update tmp_hilf set tid=1 where tid is null;
<#assign counter_tid = 1 />
<#foreach c2l in m_chart2layout>
insert into tmp_chart2layout (tid,chart_id,layout_id,caption,sortnr)
select
max(tid)+${counter_tid},
(select max(tid) from viz_chart where uniquename='${c2l.chart}'),
(select max(tid) from rpta_column_layout where uniquename='${c2l.layout}'),
'${c2l.caption}',
${c2l.sortnr}
from tmp_hilf;
<#assign counter_tid = counter_tid + 1 />
</#foreach>
insert into viz_chart2layout ( tid, chart_id, layout_id, caption, sortnr)
SELECT tid, chart_id, layout_id, caption, sortnr
FROM tmp_chart2layout;
update viz_chart2layout CL set caption=C.caption
from viz_chart C
where C.tid=CL.chart_id
and CL.caption=''
;
drop table tmp_chart2layout;
drop table tmp_hilf;
<#if SQLdialect='Postgres'>
select sp_update_sequence('viz_chart2layout');
</#if>
</#macro>

94
src-modules/module/viz/schluesseltabellen/viz_chart.unl

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save