Visualisierungsmodul für SuperX http://www.superx-projekt.de/doku/viz_modul/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

192 lines
5.8 KiB

44630^Campus-Dashboard Kopfzeile^--Freemarker Template\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
--Freemarker Template\
<sqlvars>\
<sqlvar name="zul_antr_aggr_exists">\
select sp_table_exists('zul_antr_aggr') from xdummy;\
</sqlvar>\
<sqlvar name="dashboard" type="hash"><![CDATA[ \
select tid,\
uniquename,\
caption,\
maskeninfo_id,\
booklet_stylesheet,\
gridtitle_felderinfo_id\
from viz_dashboard \
where uniquename=<<Dashboard>>;\
]]>\
</sqlvar>\
<sqlvar name="dashboard_tabs" type="hashsequence"><![CDATA[ \
select T.tid,\
T.dashboard_id,\
T.caption as name,\
T.maskeninfo_id,\
T.sortnr,\
T.select_clause,\
T.fact_table,\
T.where_clause,\
T.optional_filter_name ,\
T.optional_filter_value ,\
T.booklet_stylesheet\
FROM viz_dashboard_tab T, viz_dashboard D\
where T.dashboard_id=D.tid\
and D.uniquename=<<Dashboard>>\
order by T.sortnr;\
]]>\
</sqlvar>\
</sqlvars>\
\
\
--Autor D. Quathamer 2024\
<#assign jahr_filter="1=1" />\
--Akad. Jahr 2022: WS + SS - Beispiel: WS 22/23 + SS 2023\
<#if "<<Jahr>>" !="">\
<#assign jahr_filter="(" />\
<#assign jahr_filter=jahr_filter + "(substring('' || sem_rueck_beur_ein from 5 for 1)='2' and val(substring('' || sem_rueck_beur_ein from 1 for 4))=<<Jahr>>)" />\
<#assign jahr_filter=jahr_filter + " or "/>\
<#assign jahr_filter=jahr_filter + "(substring('' || sem_rueck_beur_ein from 5 for 1)='1' and (val(substring('' || sem_rueck_beur_ein from 1 for 4))-1)=<<Jahr>>)" />\
<#assign jahr_filter=jahr_filter + ")" />\
</#if>\
\
<#assign filter="1=1\
/* and sem_rueck_beur_ein = <<Bis Semester>> */\
" />\
\
<#assign filter= filter + " and " + jahr_filter />\
\
<#assign stg_filter = " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \
\
<#assign kennzahlen = [\
{"name":"Studierende", \
"selectClause":"sum(summe) as summe", \
"factTable":"sos_stg_aggr",\
"whereClause":"studiengang_nr=1\
and fach_nr=1\
and stichtag=(select I.tid from sos_stichtag I where I.appl_key='0')",\
"optionalFilterName":"",\
"optionalFilterValue":"",\
"linkMaskeninfoTID":"44190",\
"booklet_stylesheet":"viz_report_44190_xmlsource.jrxml"\
},\
{"name":"Studienanfänger*innen im 1. HS", \
"selectClause":"sum(summe) as summe", \
"factTable":"sos_stg_aggr",\
"whereClause":"studiengang_nr=1\
and fach_nr=1\
and stichtag=(select I.tid from sos_stichtag I where I.appl_key='0') and "+SOS_HSSEM_1,\
"optionalFilterName":"Filter Studierende",\
"optionalFilterValue":"SOS_HSSEM_1",\
"linkMaskeninfoTID":"44190",\
"booklet_stylesheet":"viz_report_44190_xmlsource.jrxml"\
},\
{"name":"Studienanfänger*innen im 1. FS", \
"selectClause":"sum(summe) as summe", \
"factTable":"sos_stg_aggr",\
"whereClause":"studiengang_nr=1\
and fach_nr=1\
and stichtag=(select I.tid from sos_stichtag I where I.appl_key='0') and fach_sem_zahl=1",\
"optionalFilterName":"bis Fachsemester",\
"optionalFilterValue":"1",\
"linkMaskeninfoTID":"44190",\
"booklet_stylesheet":"viz_report_44190_xmlsource.jrxml"\
}\
\
] />\
\
create temp table tmp_erg(\
ord integer,\
kennz varchar(255),\
wert integer,\
hidden_link_maskeninfo_id integer,\
hidden_optional_filter_name varchar(255),\
hidden_optional_filter_value varchar(255),\
hidden_booklet_stylesheet varchar(255),\
gridtitle_felderinfo_id integer\
);\
\
--erster Reiter:\
insert into tmp_erg(\
ord,\
kennz,\
--wert,\
hidden_link_maskeninfo_id,\
hidden_booklet_stylesheet,\
--optional_filter_name,\
--optional_filter_value\
gridtitle_felderinfo_id\
)\
select 1,\
'${VIZ_HS_KUERZEL} ${dashboard.caption}' ,\
${dashboard.maskeninfo_id},\
'${dashboard.booklet_stylesheet}',\
val('${dashboard.gridtitle_felderinfo_id}')\
from xdummy;\
\
<#assign ord=1 />\
<#foreach kennzahl in dashboard_tabs>\
<#assign ord=ord+1 />\
\
insert into tmp_erg(\
ord,\
kennz,\
wert,\
hidden_link_maskeninfo_id,\
hidden_optional_filter_name,\
hidden_optional_filter_value,\
hidden_booklet_stylesheet\
)\
select ${ord},'${kennzahl.name}',\
${kennzahl.select_clause},\
${kennzahl.maskeninfo_id},\
'${kennzahl.optional_filter_name}',\
'${kennzahl.optional_filter_value}',\
'${kennzahl.booklet_stylesheet}'\
from ${kennzahl.fact_table}\
where ${filter}\
and 's_' || tid_stg in <@printkeys Studiengang.allNeededKeysList/>\
and ${kennzahl.where_clause}\
group by 1,2;\
\
</#foreach>\
\
select ord,\
kennz,\
wert,\
hidden_link_maskeninfo_id,\
hidden_optional_filter_name,\
hidden_optional_filter_value,\
hidden_booklet_stylesheet,\
gridtitle_felderinfo_id as hiddengridtitle_felderinfo_id\
\
from tmp_erg\
order by ord;^XIL List\
sizable_columns horizontal_scrolling\
white_space_color=COLOR_WHITE fixed_columns=1\
drop_and_delete movable_columns\
min_heading_height=55\
Column CID=0 heading_text="Kennzahl Nr." explanation="" center_heading\
row_selectable heading_platform readonly\
width=10\
Column CID=0 heading_text="Kennzahl" explanation="" center_heading\
row_selectable heading_platform readonly\
width=40\
Column CID=0 heading_text="Wert" explanation="" center_heading\
row_selectable heading_platform readonly\
width=10\
Column CID=0 heading_text="Maske" explanation="" center_heading\
row_selectable heading_platform readonly\
width=10\
Column CID=0 heading_text="Zusatzfilter Name" explanation="" center_heading\
row_selectable heading_platform readonly\
width=30\
Column CID=0 heading_text="Zusatzfilter Wert" explanation="" center_heading\
row_selectable heading_platform readonly\
width=30\
Column CID=0 heading_text="Booklet-Stylesheet" explanation="" center_heading\
row_selectable heading_platform readonly\
width=30\
Column CID=0 heading_text="Titel (Grid)" explanation="" center_heading\
row_selectable heading_platform readonly\
width=30\
@@@^ ^ ^Das Dashboard zeigt wahlweise Studierende und Studienanfänger*innen nach verschiedenen Merkmalen an.^drop table tmp_erg;^^3^700^360^0^1^Hier erläutern wir die Anzeige^