8 changed files with 6 additions and 272 deletions
@ -1,30 +0,0 @@ |
|||||||
48140^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_exam_unit_dim_studiengang'\ |
|
||||||
)\ |
|
||||||
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_exam_unit_dim_studiengang'\ |
|
||||||
) and uniquename='rpta_exam_unit_dim_studiengang_note';^ |
|
||||||
48141^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
|
||||||
48142^Fächer^30^0^0^130^200^6^char^1000^0^999^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48143^Abschluss^40^0^0^100^200^3^char^1500^0^999^<<SQL>> select apnr, druck from cifx where key=35 order by 2;^ ^ ^ |
|
||||||
48144^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^999^ ^ ^ ^ |
|
||||||
48145^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^Eintrag^<<SQL>> select 2,'nur Wintersemester' from xdummy^ |
|
||||||
48146^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^999^hs_zugangsber^apnr, eintrag^ ^ |
|
||||||
48147^Bis Semester^20^350^-1^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
|
||||||
48148^Staatsangehörigkeit^150^0^0^140^150^10^char^30^0^999^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48149^Studiengang^25^0^0^140^150^50^char^1000^0^999^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^ |
|
||||||
48150^tablestylesheet^4000^0^0^100^200^1^char^200^1^1^<<SQL>> select distinct filename,X.caption,ord from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=48140 order by ord;^^<<SQL>> select distinct filename,X.caption,ord from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=48140 order by ord limit 1;^ |
|
||||||
48151^Stichtag^23^330^-1^130^100^1^sql^30^1^999^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^ ^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende' and appl_key='0';^ |
|
||||||
48152^Hörerstatus^200^330^-1^140^150^1^sql^30^0^999^<<SQL>> select apnr, eintrag from hoererstatus order by 2^apnr, eintrag^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^ |
|
||||||
48153^Ausgabeformat^4010^0^0^100^150^1^char^200^1^1^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and (nature::smallint<100 or nature::smallint=101) order by nature::smallint^ ^<<SQL>> select element_value,description from menu_element where element='Ausgabeformat' and description='XLSX'^ |
|
||||||
48158^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^999^<<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';^ |
|
||||||
48162^Geschlecht^110^0^0^140^80^1^integer^30^0^999^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^ |
|
||||||
48163^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>>) order by 2;^ ^ ^ |
|
||||||
48164^Fachbereich^30^0^0^130^200^6^char^1000^1^1^<<SQL>> select apnr,druck from cifx where key=90 and today() between d_akt_von and d_akt_bis order by 2;^ ^ ^ |
|
@ -1 +0,0 @@ |
|||||||
48140^7^ |
|
@ -1,18 +0,0 @@ |
|||||||
48140^48140^ |
|
||||||
48140^48141^ |
|
||||||
48140^48142^ |
|
||||||
48140^48143^ |
|
||||||
48140^48144^ |
|
||||||
48140^48145^ |
|
||||||
48140^48146^ |
|
||||||
48140^48147^ |
|
||||||
48140^48148^ |
|
||||||
48140^48149^ |
|
||||||
48140^48150^ |
|
||||||
48140^48151^ |
|
||||||
48140^48152^ |
|
||||||
48140^48153^ |
|
||||||
48140^48158^ |
|
||||||
48140^48162^ |
|
||||||
48140^48163^ |
|
||||||
48140^48164^ |
|
@ -1,216 +0,0 @@ |
|||||||
48140^Leistungen und Studiengänge (Makro)^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="basetable" type="hash"><![CDATA[\ |
|
||||||
<#assign my_base_rs='rpta_exam_unit_dim_studiengang' />\ |
|
||||||
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\ |
|
||||||
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>\ |
|
||||||
</sqlvars>\ |
|
||||||
\ |
|
||||||
<#assign filter="1=1\ |
|
||||||
/* and sem_der_pruefung >= <<Seit Semester>> */\ |
|
||||||
/* and sem_der_pruefung <= <<Bis Semester>> */\ |
|
||||||
/* and sem_der_pruefung = <<Semester>> */\ |
|
||||||
/* and substring('' || sem_der_pruefung from 5 for 1)='<<Semestertyp>>' */\ |
|
||||||
/* and fach_sem_zahl <= <<bis Fachsemester>> */\ |
|
||||||
" />\ |
|
||||||
\ |
|
||||||
<#assign filter = filter + " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \ |
|
||||||
<#assign filter = filter + " and tid_stg in (select tid from lehr_stg_ab where stg in "+Fächer.allNeededKeysList +")"/> \ |
|
||||||
\ |
|
||||||
<#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>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
select \ |
|
||||||
--zuerst die Basisdaten:\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if column.coltype="physicalColumn">\ |
|
||||||
${column.srcfieldname} as ${column.srcfieldname},\ |
|
||||||
<#elseif column.coltype="logicalColumn">\ |
|
||||||
${column.colfunction} as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype="lookupColumn">\ |
|
||||||
(${column.colfunction}) as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype="computedColumn" || column.coltype=="processingColumn">\ |
|
||||||
null::decimal(19,6) as ${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_stud\ |
|
||||||
from ${basetable.runtime_tablename}\ |
|
||||||
<#if rpta_column_layout.whereclause !="">\ |
|
||||||
where ${rpta_column_layout.whereclause}\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
--ergebnistabelle:\ |
|
||||||
select \ |
|
||||||
--zuerst die nicht-Aggregate:\ |
|
||||||
<#assign groupby=0 />\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
-- logicalColumns ausgeschlossen, da sie von processingColumns aggregiert werden\ |
|
||||||
-- computedColumns immer mitnehmen, da später verarbeitet\ |
|
||||||
<#if column.is_aggregate==0 && column.coltype!="logicalColumn" && column.coltype!="processingColumn" || column.coltype="computedColumn"> \ |
|
||||||
<#assign groupby=groupby+1 />\ |
|
||||||
${column.targetfieldname},\ |
|
||||||
<#elseif column.is_aggregate==0 && column.coltype="processingColumn"> \ |
|
||||||
<#assign groupby=groupby+1 />\ |
|
||||||
${column.srcfieldname} as ${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
--dann die Aggregate:\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
-- logicalColumns ausgeschlossen, da sie von processingColumns aggregiert werden\ |
|
||||||
-- computedColumns ausgeschlossen, da später im finalen select verarbeitet\ |
|
||||||
<#if column.is_aggregate==1 && column.coltype!="computedColumn" && column.coltype!="logicalColumn"> \ |
|
||||||
${column.colfunction}(${column.srcfieldname}) as ${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_stud2\ |
|
||||||
from tmp_stud\ |
|
||||||
where 1=1\ |
|
||||||
/* ${<<Zusatzfilter>>} */\ |
|
||||||
group by\ |
|
||||||
<#list 1..groupby as i>${i}\ |
|
||||||
<#if i != groupby>\ |
|
||||||
,\ |
|
||||||
</#if>\ |
|
||||||
</#list>\ |
|
||||||
;\ |
|
||||||
--für Prozentwerte alle Aggregate summieren:\ |
|
||||||
select <#foreach column in columns>\ |
|
||||||
<#if column.is_aggregate==1 && column.coltype!="computedColumn" && column.coltype!="processingColumn">\ |
|
||||||
sum(${column.targetfieldname})::float as ${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_gesamt\ |
|
||||||
from tmp_stud2\ |
|
||||||
where 1=1\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
<#assign number_of_visible_colums=0 />\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if column.is_visible!=0>\ |
|
||||||
<#assign number_of_visible_colums=number_of_visible_colums+1 />\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
<#assign colnr=0 />\ |
|
||||||
select \ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if column.is_visible!=0>\ |
|
||||||
<#assign colnr=colnr+1 />\ |
|
||||||
<#assign format_sql="" />\ |
|
||||||
<#if column.format_sql?string != "">\ |
|
||||||
<#assign format_sql=column.format_sql />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#if column.coltype=="computedColumn">\ |
|
||||||
(${column.colfunction})${format_sql} as ${column.targetfieldname}\ |
|
||||||
<#else>\ |
|
||||||
${column.targetfieldname}${format_sql} as ${column.targetfieldname}\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#if colnr < number_of_visible_colums>,</#if>\ |
|
||||||
</#if> --wenn sichtbar\ |
|
||||||
</#foreach>\ |
|
||||||
from tmp_stud2\ |
|
||||||
order by <#list 1..number_of_visible_colums as i>${i}\ |
|
||||||
<#if i != number_of_visible_colums>\ |
|
||||||
,\ |
|
||||||
</#if>\ |
|
||||||
</#list>\ |
|
||||||
;\ |
|
||||||
<#if basetable.is_virtual==1>\ |
|
||||||
drop table if exists ${basetable.runtime_tablename};\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
drop table if exists tmp_stud;\ |
|
||||||
drop table if exists tmp_stud2;\ |
|
||||||
drop table if exists tmp_gesamt;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
</#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>\ |
|
||||||
@@@^Studienfach^Anzahl bzw. Anteil^Makrobericht zur Ausgabe nach Fächern^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>>;^ |
|
@ -1 +0,0 @@ |
|||||||
16^48140^ |
|
Loading…
Reference in new issue