5 changed files with 189 additions and 0 deletions
@ -0,0 +1,33 @@
@@ -0,0 +1,33 @@
|
||||
48280^Studiengang^39^0^0^150^200^6^char^30^0^999^<<SQL>> select tid,name,sortnr from sichten where art in ('MAN-STG-Kostenstellen-Sicht','MAN-Studiengang-Sicht') and aktiv=1 order by 3,2;^ ^ ^ |
||||
48281^Kennzahl^100^0^0^150^200^2^char^255^0^1^<<SQL>> select C.id,trim(C.name) || ' - (' || C.id || ')'\ |
||||
from kenn_katalog C\ |
||||
where \ |
||||
C.id in (select distinct kenn_zahl from sxc_zahl_wert where sxc_bestand_id=<<Bestand>>)\ |
||||
order by id^ ^ ^ |
||||
48282^Institution^2^0^0^150^200^1^char^30^0^999^<<SQL>>select tid,type,name from sichten where art ='MAN-Kostenstellen-Sicht' and aktiv=1 order by type,name;^ ^ ^ |
||||
48283^Start-Jahr^4^0^0^100^50^1^integer^30^0^1^<<SQL>> SELECT distinct ord,name FROM aggregierung where kategorie='KENN-Jahr' order by 1;^ ^<<SQL>> SELECT ord,name FROM aggregierung where kategorie='KENN-Jahr' and ord=(year(today())-1) ;^ |
||||
48284^Startsemester^7^0^0^140^80^1^integer^30^0^999^<<SQL>> select tid, eintrag from man_semester order by tid DESC;^ ^ ^ |
||||
48285^tablestylesheet^121^0^0^100^200^1^char^200^0^13^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=888881430^hidden^<<SQL>> select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=888881430 and S.ord=1^ |
||||
48286^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='rpta_sxc_zahl_wert'\ |
||||
and R.systeminfo_id=200)\ |
||||
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='rpta_sxc_zahl_wert'\ |
||||
and R.systeminfo_id=200) and uniquename='sxc_zahl_wert_stammdaten_nrw';^ |
||||
48287^Spalten^3001^0^0^150^190^10^char^30^0^999^<<SQL>>\ |
||||
select C.uniquename, C.caption ,L.layout_id from rpta_column C, rpta_column2layout L where C.tid=L.column_id and layout_id in\ |
||||
(select tid from rpta_column_layout where uniquename=<<Spaltenlayout>>) \ |
||||
and L.is_visible=1\ |
||||
order by 2;^ ^ ^ |
||||
48288^Schlüssel anzeigen^150^0^0^100^100^1^integer^30^0^1^<<SQL>> select 1,'Ja' from xdummy union select 0,'Nein' from xdummy^hidden^<<SQL>> select 1,'Ja' from xdummy^ |
||||
48289^Ausgabeformat^4001^0^0^100^150^1^char^200^0^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and nature::smallint<100 order by nature::smallint^ ^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='HTML';^ |
||||
48290^Endsemester^8^0^0^140^100^1^integer^30^0^999^<<SQL>> select tid, eintrag from man_semester order by tid DESC;^ ^ ^ |
||||
48291^End-Jahr^5^0^0^100^50^1^integer^30^0^1^<<SQL>> SELECT distinct ord,name FROM aggregierung where kategorie='KENN-Jahr' order by 1;^ ^<<SQL>> SELECT ord,name FROM aggregierung where kategorie='KENN-Jahr' and ord=(year(today())-1) ;^ |
||||
48292^Zeitraumtyp^110^0^0^100^150^1^char^30^1^1^<<SQL>> select 'S', 'Semester' from xdummy union select 'J', 'Jahr' from xdummy^hidden^<<SQL>> select 'S', 'Semester' from xdummy^ |
||||
48293^Bestand^1^0^0^150^200^1^char^30^1^1^<<SQL>> select tid,name from sxc_bestand;^ ^<<SQL>> select tid,name from sxc_bestand order by tid;^ |
||||
48294^Hochschule^1^0^0^150^200^5^char^30^0^12^<<SQL>> select tid, type, name,sortnr from sichten where art in('SXC_Hochschulen-Sicht') and aktiv=1 order by sortnr desc, name;^ ^ ^ |
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
48280^200^ |
@ -0,0 +1,15 @@
@@ -0,0 +1,15 @@
|
||||
48280^48280^ |
||||
48280^48281^ |
||||
48280^48282^ |
||||
48280^48283^ |
||||
48280^48284^ |
||||
48280^48285^ |
||||
48280^48286^ |
||||
48280^48287^ |
||||
48280^48288^ |
||||
48280^48289^ |
||||
48280^48290^ |
||||
48280^48291^ |
||||
48280^48292^ |
||||
48280^48293^ |
||||
48280^48294^ |
@ -0,0 +1,139 @@
@@ -0,0 +1,139 @@
|
||||
48280^SuperX-Connect Kennzahlen^--Freemarker Template\ |
||||
<#include "SQL_lingua_franca"/>\ |
||||
<#include "SuperX_general"/>\ |
||||
--\ |
||||
--Autor D. Quathamer 2024\ |
||||
<sqlvars>\ |
||||
<sqlvar name="my_base_rs"><![CDATA[\ |
||||
select R.uniquename\ |
||||
from rpta_resultset R, rpta_column_layout L\ |
||||
where L.resultset_id=R.tid\ |
||||
and L.uniquename=<<Spaltenlayout>>;]]>\ |
||||
</sqlvar>\ |
||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
||||
SELECT distinct name,\ |
||||
0::smallint as is_virtual,\ |
||||
name as runtime_tablename\ |
||||
from sx_tables\ |
||||
where name in ('${my_base_rs}')\ |
||||
and 0=(select count(*) from rpta_resultset R where R.uniquename='${my_base_rs}')\ |
||||
union\ |
||||
select R.uniquename,\ |
||||
1::smallint as is_virtual,\ |
||||
'tmp_' || R.uniquename as runtime_tablename\ |
||||
from rpta_resultset R where R.uniquename='${my_base_rs}'\ |
||||
;\ |
||||
]]>\ |
||||
</sqlvar>\ |
||||
<sqlvar name="rpta_resultset" type="hash"><![CDATA[\ |
||||
select caption,\ |
||||
uniquename,\ |
||||
fieldclause,\ |
||||
joinclause,\ |
||||
whereclause,\ |
||||
systeminfo_id\ |
||||
from rpta_resultset\ |
||||
where uniquename='${basetable.name}';\ |
||||
\ |
||||
]]></sqlvar>\ |
||||
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\ |
||||
select L.uniquename,\ |
||||
L.caption,\ |
||||
L.whereclause,\ |
||||
L.sortclause\ |
||||
from rpta_resultset R, rpta_column_layout L\ |
||||
where L.resultset_id=R.tid\ |
||||
and R.uniquename='${basetable.name}'\ |
||||
and L.uniquename=<<Spaltenlayout>>;\ |
||||
\ |
||||
]]></sqlvar>\ |
||||
<sqlvar name="columns" type="hashsequence"><![CDATA[\ |
||||
SELECT C.srcfieldname,\ |
||||
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\ |
||||
T.uniquename as coltype,\ |
||||
C.is_aggregate,\ |
||||
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\ |
||||
CL.is_visible,\ |
||||
CL.visible_size as visible_width,\ |
||||
(select F.sql_code from rpta_format_code F where F.tid=CL.format_code_id) as format_sql,\ |
||||
C.col_function as colfunction,\ |
||||
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\ |
||||
FROM rpta_column_layout L, rpta_column2layout CL, rpta_column C, rpta_column_type T\ |
||||
where L.tid=CL.layout_id\ |
||||
and C.tid=CL.column_id\ |
||||
and T.tid=C.column_type\ |
||||
and L.uniquename=<<Spaltenlayout>>\ |
||||
/* and C.uniquename in (<<Spalten>>) */\ |
||||
order by CL.sortnr\ |
||||
;\ |
||||
]]></sqlvar>\ |
||||
<sqlvar name="endsemester"><![CDATA[\ |
||||
SELECT max(tid)\ |
||||
from semester \ |
||||
where 1=1\ |
||||
/* and tid >= <<Startsemester>> */\ |
||||
/* and tid <= <<Endsemester>> */\ |
||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
||||
and substring('' || tid from 5 for 1)='<<Semestertyp>>'\ |
||||
</#if>\ |
||||
;\ |
||||
\ |
||||
]]></sqlvar>\ |
||||
\ |
||||
</sqlvars>\ |
||||
\ |
||||
<#assign jahr_param="" />\ |
||||
<#assign jahr_filter="1=1" />\ |
||||
/* <#assign jahr_param="<<Jahr>>" /> */\ |
||||
--Akad. Jahr 2022: WS + SS - Beispiel: WS 22/23 + SS 2023\ |
||||
<#if jahr_param !="">\ |
||||
<#assign jahr_filter="(" />\ |
||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem from 5 for 1)='2' and val(substring('' || sem_rueck_beur_ein from 1 for 4))="+jahr_param+")" />\ |
||||
<#assign jahr_filter=jahr_filter + " or "/>\ |
||||
<#assign jahr_filter=jahr_filter + "(substring('' || sem from 5 for 1)='1' and (val(substring('' || sem_rueck_beur_ein from 1 for 4))-1)="+jahr_param+")" />\ |
||||
<#assign jahr_filter=jahr_filter + ")" />\ |
||||
</#if>\ |
||||
\ |
||||
<#assign filter="1=1\ |
||||
/* and hs_nr in (<<Hochschule>>) */\ |
||||
/* and geschlecht=<<Geschlecht>> */\ |
||||
/* and kenn_katalog.id in (<<Kennzahl>>) */ \ |
||||
/* and jahr >= <<Start-Jahr>> */\ |
||||
/* and jahr <= <<End-Jahr>> */\ |
||||
" />\ |
||||
\ |
||||
\ |
||||
\ |
||||
<#if columns?has_content>\ |
||||
\ |
||||
<#if basetable.is_virtual==1>\ |
||||
\ |
||||
create temp table ${basetable.runtime_tablename} as\ |
||||
select ${rpta_resultset.fieldclause} \ |
||||
from ${rpta_resultset.joinclause} \ |
||||
where 1=1\ |
||||
<#if rpta_resultset.whereclause != ""> \ |
||||
${rpta_resultset.whereclause} </#if>\ |
||||
and ${filter}\ |
||||
;\ |
||||
</#if>\ |
||||
\ |
||||
\ |
||||
\ |
||||
<@rpta_interpret_column_layout nonvirtualTableFilter=filter/>\ |
||||
\ |
||||
\ |
||||
</#if> --wenn columns?has_content^--Freemarker Template\ |
||||
XIL List\ |
||||
sizable_columns horizontal_scrolling\ |
||||
drop_and_delete movable_columns \ |
||||
white_space_color=COLOR_WHITE fixed_columns=1\ |
||||
min_heading_height=55\ |
||||
<#foreach column in columns>\ |
||||
<#if column.is_visible!=0>\ |
||||
Column CID=0 heading_text="${column.caption}" center_heading explanation="${column.description}"\ |
||||
row_selectable heading_platform readonly\ |
||||
width=${column.visible_width} text_size=60\ |
||||
</#if>\ |
||||
</#foreach>\ |
||||
@@@^ ^ ^Übersicht über vorberechnete Kennzahlen^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^1^600^360^^0^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ |
Loading…
Reference in new issue