Compare commits
No commits in common. 'master' and 'rpta_0.2_Release' have entirely different histories.
master
...
rpta_0.2_R
90 changed files with 896 additions and 9749 deletions
@ -1,149 +0,0 @@ |
|||||||
--Freemarker Template |
|
||||||
<#include "SQL_lingua_franca"/> |
|
||||||
<#include "SuperX_general"/> |
|
||||||
-- |
|
||||||
--Autor D. Quathamer 2024 |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="column_layouts" type="hashsequence"><![CDATA[ |
|
||||||
select L.tid, |
|
||||||
L.uniquename, |
|
||||||
L.caption, |
|
||||||
L.whereclause, |
|
||||||
L.uniquename as target_tablename, |
|
||||||
R.uniquename as resultset_uniquename, |
|
||||||
'tmp_' || R.uniquename as resultset_tablename, |
|
||||||
R.fieldclause as resultset_fieldclause, |
|
||||||
R.joinclause as resultset_joinclause, |
|
||||||
R.whereclause as resultset_whereclause, |
|
||||||
R.systeminfo_id as resultset_systeminfo_id |
|
||||||
from rpta_resultset R, rpta_column_layout L |
|
||||||
where L.resultset_id=R.tid |
|
||||||
and L.is_virtual=0 |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
|
|
||||||
<sqlvar name="columns" type="hashsequence"><![CDATA[ |
|
||||||
SELECT L.tid as layout_id, |
|
||||||
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.is_virtual=0 |
|
||||||
order by CL.sortnr |
|
||||||
; |
|
||||||
]]></sqlvar> |
|
||||||
|
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if column_layouts?has_content> |
|
||||||
|
|
||||||
<#foreach column_layout in column_layouts> |
|
||||||
|
|
||||||
<#if columns?has_content> |
|
||||||
|
|
||||||
--zuerst resultset aufbauen: |
|
||||||
create temp table ${column_layout.resultset_tablename} as |
|
||||||
select ${column_layout.resultset_fieldclause} |
|
||||||
from ${column_layout.resultset_joinclause} |
|
||||||
where 1=1 |
|
||||||
<#if column_layout.resultset_whereclause != ""> |
|
||||||
${column_layout.resultset_whereclause} </#if> |
|
||||||
; |
|
||||||
|
|
||||||
--dann das Spaltenlayout |
|
||||||
select |
|
||||||
--zuerst die Basisdaten: |
|
||||||
<#foreach column in columns> |
|
||||||
<#if column.layout_id=column_layout.tid> |
|
||||||
|
|
||||||
<#if column.coltype="physicalColumn"> |
|
||||||
${column.srcfieldname}, |
|
||||||
<#elseif column.coltype="logicalColumn"> |
|
||||||
${column.colfunction} as ${column.targetfieldname}, |
|
||||||
<#elseif column.coltype="lookupColumn"> |
|
||||||
(${column.colfunction}) as ${column.targetfieldname}, |
|
||||||
<#elseif column.coltype="computedColumn"> |
|
||||||
null::decimal(19,6) as ${column.targetfieldname}, |
|
||||||
</#if> |
|
||||||
|
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
null::char(1) as dummycol |
|
||||||
into temp tmp_stud |
|
||||||
from ${column_layout.resultset_tablename} |
|
||||||
where 1=1 |
|
||||||
<#if column_layout.whereclause !=""> |
|
||||||
and ${column_layout.whereclause} |
|
||||||
</#if> |
|
||||||
; |
|
||||||
|
|
||||||
drop table if exists ${column_layout.target_tablename} ; |
|
||||||
|
|
||||||
<#assign index_clause="" /> |
|
||||||
|
|
||||||
--ergebnistabelle: |
|
||||||
create table ${column_layout.target_tablename} as select |
|
||||||
--zuerst die nicht-Aggregate: |
|
||||||
<#assign groupby=0 /> |
|
||||||
<#foreach column in columns> |
|
||||||
<#if column.layout_id=column_layout.tid> |
|
||||||
|
|
||||||
<#if column.is_aggregate==0> |
|
||||||
<#assign groupby=groupby+1 /> |
|
||||||
${column.targetfieldname}, |
|
||||||
|
|
||||||
<#assign index_clause=index_clause+ " |
|
||||||
create index ix_${column_layout.target_tablename}_${groupby} on ${column_layout.target_tablename}(${column.targetfieldname});" /> |
|
||||||
</#if> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
--dann die Aggregate: |
|
||||||
<#foreach column in columns> |
|
||||||
<#if column.layout_id=column_layout.tid> |
|
||||||
|
|
||||||
<#if column.is_aggregate==1 && column.coltype!="computedColumn"> |
|
||||||
sum(${column.targetfieldname}) as ${column.targetfieldname}, |
|
||||||
</#if> |
|
||||||
|
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
null::char(1) as dummycol |
|
||||||
from tmp_stud |
|
||||||
where 1=1 |
|
||||||
<#if groupby !=0 > |
|
||||||
group by |
|
||||||
<#list 1..groupby as i>${i} |
|
||||||
<#if i != groupby> |
|
||||||
, |
|
||||||
</#if> |
|
||||||
</#list> |
|
||||||
</#if> |
|
||||||
|
|
||||||
; |
|
||||||
|
|
||||||
${index_clause} |
|
||||||
|
|
||||||
|
|
||||||
drop table if exists tmp_stud; |
|
||||||
drop table if exists tmp_gesamt; |
|
||||||
|
|
||||||
|
|
||||||
</#if> --wenn columns?has_content |
|
||||||
drop table ${column_layout.resultset_tablename}; |
|
||||||
</#foreach> -- Ende Schleife column_layouts |
|
||||||
</#if> --gibt es column_layouts |
|
||||||
|
|
@ -1,116 +0,0 @@ |
|||||||
--Freemarker Template |
|
||||||
<#include "SQL_lingua_franca"/> |
|
||||||
<#include "SuperX_general"/> |
|
||||||
-- |
|
||||||
--Autor D. Quathamer 2024 |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="basetables" type="hashsequence"><![CDATA[ |
|
||||||
SELECT distinct T.name, |
|
||||||
R.is_virtual, |
|
||||||
T.name as runtime_tablename, |
|
||||||
R.caption, |
|
||||||
R.uniquename, |
|
||||||
R.fieldclause, |
|
||||||
R.joinclause, |
|
||||||
R.whereclause, |
|
||||||
R.systeminfo_id |
|
||||||
from sx_tables T, rpta_resultset R |
|
||||||
where T.name=R.uniquename |
|
||||||
and R.is_virtual=0 |
|
||||||
|
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="basetable_columns" type="hashsequence"><![CDATA[ |
|
||||||
SELECT distinct T.name as table_name, |
|
||||||
F.name, |
|
||||||
F.is_sum, |
|
||||||
R.uniquename as rpta_name |
|
||||||
from sx_tables T, rpta_resultset R , sx_fields F |
|
||||||
where T.name=R.uniquename |
|
||||||
and R.is_virtual=0 |
|
||||||
and F.table_name=T.name |
|
||||||
order by F.is_sum,2,3 |
|
||||||
|
|
||||||
|
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="rpta_clauses" type="hashsequence"><![CDATA[ |
|
||||||
select distinct R.uniquename as rpta_uniquename, R.fieldclause, R.joinclause, R.whereclause from sx_tables T, rpta_resultset R |
|
||||||
where T.name=R.uniquename |
|
||||||
and R.is_virtual=0 |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
|
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if basetables?has_content> |
|
||||||
<#foreach basetable in basetables> |
|
||||||
|
|
||||||
|
|
||||||
<#if basetable.is_virtual==0> |
|
||||||
<#foreach rpta_clause in rpta_clauses> |
|
||||||
<#if rpta_clause.rpta_uniquename=basetable.uniquename> |
|
||||||
<#if rpta_clause.joinclause?exists && rpta_clause.joinclause !=''> |
|
||||||
<#assign sqlString = "select current_timestamp as creation_date, " + rpta_clause.fieldclause + " from " + rpta_clause.joinclause + " where 1=1 " + rpta_clause.whereclause /> |
|
||||||
<#else> |
|
||||||
|
|
||||||
<#assign sqlString = "select current_timestamp as creation_date, " + rpta_clause.fieldclause + " where 1=1 " + rpta_clause.whereclause /> |
|
||||||
|
|
||||||
</#if> |
|
||||||
|
|
||||||
drop table if exists ${basetable.runtime_tablename}; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_${basetable.runtime_tablename} as |
|
||||||
${sqlString} |
|
||||||
; |
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
--Summierung: |
|
||||||
<#if basetable_columns?has_content> |
|
||||||
<#assign groupby=0 /> |
|
||||||
|
|
||||||
drop table if exists ${basetable.runtime_tablename}; |
|
||||||
|
|
||||||
|
|
||||||
create table ${basetable.runtime_tablename} as |
|
||||||
select |
|
||||||
<#foreach basetable_column in basetable_columns> |
|
||||||
|
|
||||||
<#if basetable_column.is_sum=0> |
|
||||||
<#assign groupby=groupby+1 /> |
|
||||||
${basetable_column.name}, |
|
||||||
<#else> |
|
||||||
sum(${basetable_column.name})::float as ${basetable_column.name}, |
|
||||||
</#if> |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
creation_date |
|
||||||
from tmp_${basetable.runtime_tablename} |
|
||||||
group by |
|
||||||
<#list 1..groupby as i>${i}, |
|
||||||
</#list> |
|
||||||
creation_date |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_${basetable.runtime_tablename}; |
|
||||||
|
|
||||||
</#if> --Ende Summierung |
|
||||||
|
|
||||||
--TODO: indizes |
|
||||||
<#foreach basetable_column in basetable_columns> |
|
||||||
<#if basetable_column.is_sum=0> |
|
||||||
create index ix_${basetable_column.name}_dashboard on ${basetable.runtime_tablename}(${basetable_column.name}); |
|
||||||
--create index ix_tid_stg_dashboard_mw on ${basetable.runtime_tablename}(tid_stg); |
|
||||||
--create index ix_sem_rueck_beur_ein_dashboard_mw on ${basetable.runtime_tablename}(sem_rueck_beur_ein); |
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
</#if> --Ende is_virtual=0 |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</#if> |
|
@ -1,96 +0,0 @@ |
|||||||
--freemarker Template |
|
||||||
|
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="lm_exam_unit_exists"> |
|
||||||
select sp_table_exists('lm_exam_unit') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="sos_lab_pord_exists"> |
|
||||||
select sp_table_exists('sos_lab_pord') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if lm_exam_unit_exists=1 && sos_lab_pord_exists=1> |
|
||||||
|
|
||||||
truncate table rpta_exam_unit; |
|
||||||
|
|
||||||
insert into rpta_exam_unit (matrikel_nr, |
|
||||||
labnr, |
|
||||||
sourcesystem, |
|
||||||
tid_stg, |
|
||||||
sem_der_pruefung, |
|
||||||
note, |
|
||||||
fach_sem_zahl, |
|
||||||
pstatus, |
|
||||||
prueck, |
|
||||||
pvermerk, |
|
||||||
bonus, |
|
||||||
pordnr, |
|
||||||
part, |
|
||||||
ppflicht, |
|
||||||
modulart, |
|
||||||
pktxt, |
|
||||||
pdtxt, |
|
||||||
pversuch, |
|
||||||
elementnr, |
|
||||||
summe, |
|
||||||
shortcomment, |
|
||||||
panerk |
|
||||||
) |
|
||||||
SELECT |
|
||||||
matrikel_nr, |
|
||||||
labnr, |
|
||||||
sourcesystem, |
|
||||||
tid_stg, |
|
||||||
sem_der_pruefung, |
|
||||||
note, |
|
||||||
fach_sem_zahl, |
|
||||||
pstatus, |
|
||||||
prueck, |
|
||||||
pvermerk, |
|
||||||
bonus, |
|
||||||
pordnr, |
|
||||||
part, |
|
||||||
ppflicht, |
|
||||||
modulart, |
|
||||||
pktxt, |
|
||||||
pdtxt, |
|
||||||
pversuch, |
|
||||||
elementnr, |
|
||||||
summe, |
|
||||||
<#if TableFieldExists?exists && TableFieldExists('lm_exam_unit','shortcomment')> |
|
||||||
shortcomment, |
|
||||||
<#else> |
|
||||||
null::varchar(255) as shortcomment, |
|
||||||
</#if> |
|
||||||
panerk |
|
||||||
|
|
||||||
FROM lm_exam_unit |
|
||||||
|
|
||||||
UNION SELECT |
|
||||||
matrikel_nr, |
|
||||||
labnr, |
|
||||||
sourcesystem, |
|
||||||
tid_stg, |
|
||||||
sem_der_pruefung, |
|
||||||
note, |
|
||||||
fach_sem_zahl, |
|
||||||
pstatus, |
|
||||||
prueck, |
|
||||||
pvermerk, |
|
||||||
bonus, |
|
||||||
pordnr, |
|
||||||
part, |
|
||||||
ppflicht, |
|
||||||
modulart, |
|
||||||
pktxt, |
|
||||||
pdtxt, |
|
||||||
pversuch, |
|
||||||
pnr::varchar(255) as elementnr, |
|
||||||
summe, |
|
||||||
null::varchar(255) as shortcomment, |
|
||||||
(select L.panerk from sos_lab L where L.labnr=sos_lab_pord.labnr and L.sourcesystem = 5) |
|
||||||
FROM sos_lab_pord |
|
||||||
WHERE sourcesystem = 5 |
|
||||||
; |
|
||||||
|
|
||||||
</#if> |
|
@ -1,7 +0,0 @@ |
|||||||
|
|
||||||
select * from xdummy; |
|
||||||
--bei Postgres in HIS1 laufen alle Scripte in Transaktionen, daher muss man |
|
||||||
--für vacuum erst committen |
|
||||||
commit; |
|
||||||
vacuum rpta_exam_unit; |
|
||||||
|
|
@ -1,13 +0,0 @@ |
|||||||
44630^Bis Semester^4^350^-1^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^Eintrag^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^ |
|
||||||
44631^Studiengang^6^0^0^140^150^50^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^^^ |
|
||||||
44632^Jahr^110^0^0^140^80^1^integer^30^0^13^ ^ ^ ^ |
|
||||||
44645^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=44190 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=44190 order by ord limit 1^ |
|
||||||
44647^Grafik^1000^300^-1^170^150^1^integer^30^0^1^<<SQL>> select tid, caption from viz_chart order by 2;^hidden^ ^ |
|
||||||
44649^Spaltenanzahl^5^350^-1^140^80^1^integer^255^0^1^<<SQL>> SELECT 0,'Dynamisch' from xdummy \ |
|
||||||
union SELECT 1,'1-spaltig' from xdummy \ |
|
||||||
union SELECT 2,'2-spaltig' from xdummy \ |
|
||||||
union SELECT 3,'3-spaltig' from xdummy \ |
|
||||||
union SELECT 4,'4-spaltig' from xdummy \ |
|
||||||
order by 1;^ ^<<SQL>> SELECT 2,'2-spaltig' from xdummy;^ |
|
||||||
44650^Kachelbreite^30^0^0^100^100^1^integer^5000^0^0^^^800^ |
|
||||||
44653^Kachelhöhe^40^0^0^100^100^1^integer^5000^0^0^^^600^ |
|
@ -1 +0,0 @@ |
|||||||
44630^320^ |
|
@ -1,8 +0,0 @@ |
|||||||
44630^44630^ |
|
||||||
44630^44631^ |
|
||||||
44630^44632^ |
|
||||||
44630^44645^ |
|
||||||
44630^44647^ |
|
||||||
44630^44649^ |
|
||||||
44630^44650^ |
|
||||||
44630^44653^ |
|
@ -1,106 +0,0 @@ |
|||||||
44630^Dashboard Kopfzeile^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--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 /> \ |
|
||||||
\ |
|
||||||
create temp table tmp_erg(\ |
|
||||||
ord integer,\ |
|
||||||
kennz varchar(255),\ |
|
||||||
wert integer,\ |
|
||||||
link_maskeninfo_id integer\ |
|
||||||
);\ |
|
||||||
\ |
|
||||||
insert into tmp_erg(ord,kennz,wert)\ |
|
||||||
select 1,'Bewerbungen',sum(summe)\ |
|
||||||
from zul_antr_aggr A\ |
|
||||||
where A.bewsem=<<Bis Semester>>\ |
|
||||||
and A.stg in (select L.stg from lehr_stg_ab L where 's_' || L.tid in <@printkeys Studiengang.allNeededKeysList/>)\ |
|
||||||
and A.abschl in (select L.abschluss from lehr_stg_ab L where 's_' || L.tid in <@printkeys Studiengang.allNeededKeysList/>)\ |
|
||||||
group by 1,2;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
insert into tmp_erg(ord,kennz,wert)\ |
|
||||||
select 10,'Studienanfänger*innen im 1. HS',sum(summe)\ |
|
||||||
from sos_stg_aggr S, sos_stichtag I\ |
|
||||||
where ${filter}\ |
|
||||||
and S.studiengang_nr=1\ |
|
||||||
and S.fach_nr=1\ |
|
||||||
and S.stichtag=I.tid\ |
|
||||||
and I.appl_key='0'\ |
|
||||||
and 's_' || S.tid_stg in <@printkeys Studiengang.allNeededKeysList/>\ |
|
||||||
and S.hssem=1\ |
|
||||||
group by 1,2;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
insert into tmp_erg(ord,kennz,wert)\ |
|
||||||
select 20,'Studierende gesamt',sum(summe)\ |
|
||||||
from sos_stg_aggr S, sos_stichtag I\ |
|
||||||
where ${filter}\ |
|
||||||
and S.studiengang_nr=1\ |
|
||||||
and S.fach_nr=1\ |
|
||||||
and S.stichtag=I.tid\ |
|
||||||
and I.appl_key='0'\ |
|
||||||
and 's_' || S.tid_stg in <@printkeys Studiengang.allNeededKeysList/>\ |
|
||||||
group by 1,2;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
insert into tmp_erg(ord,kennz,wert)\ |
|
||||||
select 30,'Studierende im Lehramt',sum(summe)\ |
|
||||||
from sos_stg_aggr S, sos_stichtag I, dim_studiengang D\ |
|
||||||
where ${filter}\ |
|
||||||
and S.studiengang_nr=1\ |
|
||||||
and S.fach_nr=1\ |
|
||||||
and S.stichtag=I.tid\ |
|
||||||
and D.tid=S.tid_stg\ |
|
||||||
and D.ist_lehramt=1\ |
|
||||||
and I.appl_key='0'\ |
|
||||||
and 's_' || S.tid_stg in <@printkeys Studiengang.allNeededKeysList/>\ |
|
||||||
group by 1,2;\ |
|
||||||
\ |
|
||||||
insert into tmp_erg(ord,kennz,wert)\ |
|
||||||
select 30,'Absolvent*innen',sum(summe)\ |
|
||||||
from sos_lab_aggr S, sos_stichtag I, dim_studiengang D\ |
|
||||||
where S.sem_der_pruefung=<<Bis Semester>>\ |
|
||||||
and S.studiengang_nr=1\ |
|
||||||
and S.fach_nr=1\ |
|
||||||
and S.stichtag=I.tid\ |
|
||||||
and D.tid=S.tid_stg\ |
|
||||||
and I.appl_key='2'\ |
|
||||||
and 's_' || S.tid_stg in <@printkeys Studiengang.allNeededKeysList/>\ |
|
||||||
group by 1,2;\ |
|
||||||
\ |
|
||||||
select kennz,wert,link_maskeninfo_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" explanation="" center_heading\ |
|
||||||
row_selectable heading_platform readonly\ |
|
||||||
width=10\ |
|
||||||
Column CID=0 heading_text="Wert" explanation="" center_heading\ |
|
||||||
row_selectable heading_platform readonly\ |
|
||||||
width=30\ |
|
||||||
Column CID=0 heading_text="Maske" explanation="" center_heading\ |
|
||||||
row_selectable heading_platform readonly\ |
|
||||||
width=30\ |
|
||||||
@@@^ ^ ^Dashboard Inistialisierung^drop table tmp_erg;^^3^700^360^0^1^^ |
|
@ -1 +0,0 @@ |
|||||||
320^44630^ |
|
@ -0,0 +1,25 @@ |
|||||||
|
45000^Spaltenlayout^3000^350^-1^140^180^1^integer^30^1^1^<<SQL>>SELECT tid,\ |
||||||
|
caption\ |
||||||
|
FROM rpta_column_layout \ |
||||||
|
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat'\ |
||||||
|
and R.systeminfo_id=7)\ |
||||||
|
order by sortnr, caption\ |
||||||
|
;^^<<SQL>>SELECT tid,\ |
||||||
|
caption\ |
||||||
|
FROM rpta_column_layout \ |
||||||
|
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat'\ |
||||||
|
and R.systeminfo_id=7)\ |
||||||
|
order by sortnr, caption\ |
||||||
|
;^ |
||||||
|
45001^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;^ |
||||||
|
45002^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;^ ^ ^ |
||||||
|
45003^Abschluss^40^0^0^100^200^3^char^1500^0^1^<<SQL>> select apnr, druck from cifx where key=35 order by 2;^ ^ ^ |
||||||
|
45004^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^0^^ ^ ^ |
||||||
|
45006^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^1^hs_zugangsber^apnr, eintrag^ ^ |
||||||
|
45007^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;^ |
||||||
|
45008^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;^ ^ ^ |
||||||
|
45009^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;^ ^ ^ |
||||||
|
45011^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';^ |
||||||
|
45012^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';^ |
||||||
|
45018^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';^ |
||||||
|
45022^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;^ ^ ^ |
@ -0,0 +1 @@ |
|||||||
|
45000^7^ |
@ -0,0 +1,13 @@ |
|||||||
|
45000^45000^ |
||||||
|
45000^45001^ |
||||||
|
45000^45002^ |
||||||
|
45000^45003^ |
||||||
|
45000^45004^ |
||||||
|
45000^45006^ |
||||||
|
45000^45007^ |
||||||
|
45000^45008^ |
||||||
|
45000^45009^ |
||||||
|
45000^45011^ |
||||||
|
45000^45012^ |
||||||
|
45000^45018^ |
||||||
|
45000^45022^ |
@ -0,0 +1 @@ |
|||||||
|
16^45000^ |
@ -1,8 +1,8 @@ |
|||||||
48040^Benutzer/in^50^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,nvl(name,benutzer) from userinfo order by 2;^hidden^^ |
45040^Benutzer/in^50^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,nvl(name,benutzer) from userinfo order by 2;^hidden^^ |
||||||
48041^Spaltenlayout^10^0^0^150^80^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_column_layout where 1=1 /* and resultset_id=<<Virtuelle Tabelle>> */ order by 2;^^^ |
45041^Spaltenlayout^10^0^0^150^80^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_column_layout where 1=1 /* and resultset_id=<<Virtuelle Tabelle>> */ order by 2;^^^ |
||||||
48042^Spaltenlayouts verwalten^110^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_column_layout_list.jsp' from xdummy;^ |
45042^Spaltenlayouts verwalten^110^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_column_layout_list.jsp' from xdummy;^ |
||||||
48043^Stichwort^20^0^0^150^150^1^sql^50^0^0^^^^ |
45043^Stichwort^20^0^0^150^150^1^sql^50^0^0^^^^ |
||||||
48044^Komponente^1^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,name from systeminfo order by 2;^ ^^ |
45044^Komponente^1^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,name from systeminfo order by 2;^ ^^ |
||||||
48045^Virtuelle Tabellen bearbeiten^100^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_resultset_list.jsp' from xdummy;^ |
45045^Virtuelle Tabellen bearbeiten^100^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_resultset_list.jsp' from xdummy;^ |
||||||
48046^Virtuelle Tabelle^5^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_resultset where 1=1 /* and systeminfo_id=<<Komponente>> */ order by 2;^^^ |
45046^Virtuelle Tabelle^5^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_resultset where 1=1 /* and systeminfo_id=<<Komponente>> */ order by 2;^^^ |
||||||
48047^Spaltentyp^200^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_column_type order by 2;^^ ^ |
45047^Spaltentyp^200^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_column_type order by 2;^^ ^ |
@ -0,0 +1 @@ |
|||||||
|
45040^330^ |
@ -0,0 +1,8 @@ |
|||||||
|
45040^45040^ |
||||||
|
45040^45041^ |
||||||
|
45040^45042^ |
||||||
|
45040^45043^ |
||||||
|
45040^45044^ |
||||||
|
45040^45045^ |
||||||
|
45040^45046^ |
||||||
|
45040^45047^ |
@ -0,0 +1 @@ |
|||||||
|
331^45040^ |
@ -1,31 +0,0 @@ |
|||||||
48000^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='sos_stud_astat'\ |
|
||||||
and R.systeminfo_id=7)\ |
|
||||||
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='sos_stud_astat'\ |
|
||||||
and R.systeminfo_id=7) and uniquename='sos_stud_astat_rsz';^ |
|
||||||
48001^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;^ |
|
||||||
48002^Fächer^30^0^0^130^200^6^integer^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48003^Abschluss^40^0^0^100^200^3^char^1500^0^1^<<SQL>> select apnr, druck from cifx where key=35 order by 2;^ ^ ^ |
|
||||||
48004^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^0^^ ^ ^ |
|
||||||
48005^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^ |
|
||||||
48006^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^1^hs_zugangsber^ ^ ^ |
|
||||||
48007^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;^ |
|
||||||
48008^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;^ ^ ^ |
|
||||||
48009^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;^ ^ ^ |
|
||||||
48010^Semester^100^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^hidden^ ^ |
|
||||||
48011^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';^ |
|
||||||
48012^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';^ |
|
||||||
48013^Jahr^110^0^0^140^80^1^integer^30^0^13^ ^ ^ ^ |
|
||||||
48014^Filter Studierende^100^0^0^140^150^1^sql^20^0^1^<<SQL>> SELECT id,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SOS_STUD_FILTER' order by 2;^^^ |
|
||||||
48015^Nur Endsemester^21^0^0^140^80^1^integer^30^0^1^<<SQL>> select 1,'ja' from xdummy^Eintrag^ ^ |
|
||||||
48018^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^ ^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^ |
|
||||||
48022^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;^ ^ ^ |
|
||||||
48023^Spalten^3001^0^0^150^190^10^char^30^0^1^<<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;^^^ |
|
@ -1 +0,0 @@ |
|||||||
48000^7^ |
|
@ -1,19 +0,0 @@ |
|||||||
48000^48000^ |
|
||||||
48000^48001^ |
|
||||||
48000^48002^ |
|
||||||
48000^48003^ |
|
||||||
48000^48004^ |
|
||||||
48000^48005^ |
|
||||||
48000^48006^ |
|
||||||
48000^48007^ |
|
||||||
48000^48008^ |
|
||||||
48000^48009^ |
|
||||||
48000^48010^ |
|
||||||
48000^48011^ |
|
||||||
48000^48012^ |
|
||||||
48000^48013^ |
|
||||||
48000^48014^ |
|
||||||
48000^48015^ |
|
||||||
48000^48018^ |
|
||||||
48000^48022^ |
|
||||||
48000^48023^ |
|
@ -1,163 +0,0 @@ |
|||||||
48000^Tabellenausgabe Studierende (amtlich und intern)^--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 T.name,\ |
|
||||||
R.is_virtual,\ |
|
||||||
name as runtime_tablename\ |
|
||||||
from sx_tables T, rpta_resultset R \ |
|
||||||
where T.name=R.uniquename\ |
|
||||||
and T.name='${my_base_rs}'\ |
|
||||||
and R.is_virtual=0\ |
|
||||||
\ |
|
||||||
union\ |
|
||||||
select R.uniquename,\ |
|
||||||
R.is_virtual,\ |
|
||||||
'tmp_' || R.uniquename as runtime_tablename\ |
|
||||||
from rpta_resultset R where R.uniquename='${my_base_rs}'\ |
|
||||||
and R.is_virtual=1\ |
|
||||||
;\ |
|
||||||
]]>\ |
|
||||||
</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,\ |
|
||||||
R.is_virtual,\ |
|
||||||
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 >= <<Seit Semester>> */\ |
|
||||||
/* and tid <= <<Bis Semester>> */\ |
|
||||||
<#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_rueck_beur_ein 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_rueck_beur_ein 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 semester_filter ="1=1\ |
|
||||||
/* and sem_rueck_beur_ein >= <<Seit Semester>> */\ |
|
||||||
/* and sem_rueck_beur_ein <= <<Bis Semester>> */\ |
|
||||||
" />\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
<#assign semester_filter = semester_filter+ " and substring('' || sem_rueck_beur_ein from 5 for 1)='<<Semestertyp>>'" />\ |
|
||||||
</#if>\ |
|
||||||
<#if "<<Nur Endsemester>>"="1">\ |
|
||||||
--nur Endsemester\ |
|
||||||
<#assign semester_filter = semester_filter+ " and 1=1 and sem_rueck_beur_ein = "+endsemester /> \ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign filter="<<Köpfe oder Fälle ?>>\ |
|
||||||
/* and sem_rueck_beur_ein = <<Semester>> */\ |
|
||||||
/* and stichtag = <<Stichtag>> */\ |
|
||||||
/* and <<Hochschulzugangsberechtigung>> */\ |
|
||||||
/* and <<Hörerstatus>>*/\ |
|
||||||
/* and abschluss in (<<Abschluss>>) */\ |
|
||||||
/* and geschlecht = <<Geschlecht>> */\ |
|
||||||
/* and fach_sem_zahl <= <<bis Fachsemester>> */\ |
|
||||||
/* and substring('' || sem_rueck_beur_ein from 5 for 1)='<<Semestertyp>>' */\ |
|
||||||
/* and ${<<Filter Studierende>>} */\ |
|
||||||
" />\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + " and " + jahr_filter />\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + " and " + semester_filter />\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#assign filter = filter + " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \ |
|
||||||
/* <#assign filter = filter + " and '' || ca12_staat in "+Staatsangehörigkeit.allNeededKeysList /> --<<Staatsangehörigkeit>> */\ |
|
||||||
/* <#assign filter = filter + " and stg in "+Fächer.allNeededKeysList /> --<<Fächer>> */\ |
|
||||||
\ |
|
||||||
<#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 />\ |
|
||||||
\ |
|
||||||
</#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^Datenblatt Studierendenstatistik^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^48000^ |
|
@ -1 +0,0 @@ |
|||||||
48040^330^ |
|
@ -1,8 +0,0 @@ |
|||||||
48040^48040^ |
|
||||||
48040^48041^ |
|
||||||
48040^48042^ |
|
||||||
48040^48043^ |
|
||||||
48040^48044^ |
|
||||||
48040^48045^ |
|
||||||
48040^48046^ |
|
||||||
48040^48047^ |
|
@ -1 +0,0 @@ |
|||||||
331^48040^ |
|
@ -1,35 +0,0 @@ |
|||||||
48080^Institution (Stelle)^1^0^0^150^150^0^char^30^0^12^<<SQL>>select tid,type,name,sortnr from sichten where art in ('SVA-Kostenstellen-Sicht','SVA-spez-Besch./Kostenstellen-Sicht','SVA-spez-Kostenstellen-Sicht') and aktiv=1 order by sortnr,type,name;^^^ |
|
||||||
48081^Datum^0^350^-1^150^80^1^date^10^1^0^^^<<SQL>> select today() from xdummy^ |
|
||||||
48082^Stellenkategorie^2^0^0^150^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA Kategorie' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48083^Spalten^3001^0^0^150^190^10^char^30^0^1^<<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 tid=<<Spaltenlayout>>) order by 2;^^^ |
|
||||||
48084^Lehreinheit (Stelle)^4^0^0^150^150^1^char^4^0^12^<<SQL>> select tid,type,name from sichten where art ='SVA-Lehreinheiten-Sicht' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48085^Stellen-Nr.^50^350^-1^150^80^1^integer^10^0^0^^^^ |
|
||||||
48086^Amtsbezeichnung^55^0^0^150^160^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA Amtsdienstbez.' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48087^Beschäftigungsstelle (Person)^65^0^0^150^150^1^char^30^0^12^<<SQL>>select tid,type,name,sortnr from sichten where art in ('SVA-Kostenstellen-Sicht','SVA-spez-Besch./Kostenstellen-Sicht') and aktiv=1 order by sortnr,type,name;^hidden^^ |
|
||||||
48088^Kostenstelle (Person)^70^350^-1^150^150^1^char^30^0^12^<<SQL>> select tid,type,name,sortnr from sichten where art in ('SVA-Kostenstellen-Sicht','SVA-spez-Kostenstellen-Sicht','SVA-Kst-spezial') and aktiv=1 order by sortnr,type,name;^hidden^^ |
|
||||||
48089^Haushaltsvermerk^60^350^-1^150^200^3^char^4^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA HHV' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48090^Spaltenlayout^3000^350^-1^140^180^1^integer^50^1^1^<<SQL>>SELECT tid,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sva_pbe_aggr_sgd'\ |
|
||||||
and R.systeminfo_id=6)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
;^^<<SQL>>SELECT tid,\ |
|
||||||
caption\ |
|
||||||
FROM rpta_column_layout \ |
|
||||||
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sva_pbe_aggr_sgd'\ |
|
||||||
and R.systeminfo_id=6)\ |
|
||||||
order by sortnr, caption\ |
|
||||||
limit 1 \ |
|
||||||
;^ |
|
||||||
48091^Filter Stellen^120^350^-1^150^150^1^sql^20^0^1^<<SQL>> select id,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SVA_STELL_FILTER' order by 2;^hidden^^ |
|
||||||
48092^Dienstart^3^350^-1^150^150^3^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA Dienstart' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48093^BVL-Gruppe (Stelle)^74^0^0^150^120^10^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA BVL-Gruppen' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48094^BVL-Gruppe (Person)^80^350^-1^150^120^10^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='SVA BVL-Gruppen' and aktiv=1 order by type,name;^hidden^^ |
|
||||||
48095^Filter Besetzung^130^0^0^150^150^1^sql^20^0^1^<<SQL>> select id,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SVA_BESETZ_FILTER' order by 2;^hidden^^ |
|
||||||
48096^Finanzierungsquelle^302^0^0^100^200^3^char^30^0^1^<<SQL>> select id,caption from sx_repository where art='SVA_FINANZIERUNGSQUELLE' and aktiv=1 and gueltig_seit<=date_val(<<Datum>>) and gueltig_bis>=date_val(<<Datum>>) order by sort1^hidden^^ |
|
||||||
48097^Personalkategorie^310^0^0^100^200^3^char^30^0^1^<<SQL>> select id,caption from sx_repository where art='SVA_PERSONALKATEGORIE' and aktiv=1 and gueltig_seit<=date_val(<<Datum>>) and gueltig_bis>=date_val(<<Datum>>) order by sort1^hidden^^ |
|
||||||
48098^Stellenanzeige^1000^0^0^100^200^1^char^20^0^1^<<SQL>> select 'besetzt','nur besetzte' from xdummy union select 'frei','nur freie' from xdummy^hidden^^ |
|
||||||
48099^Stellen-Nr. im HHPlan^52^350^-1^150^80^1^char^25^0^0^^^^ |
|
@ -1 +0,0 @@ |
|||||||
48080^6^ |
|
@ -1,20 +0,0 @@ |
|||||||
48080^48080^ |
|
||||||
48080^48081^ |
|
||||||
48080^48082^ |
|
||||||
48080^48083^ |
|
||||||
48080^48084^ |
|
||||||
48080^48085^ |
|
||||||
48080^48086^ |
|
||||||
48080^48087^ |
|
||||||
48080^48088^ |
|
||||||
48080^48089^ |
|
||||||
48080^48090^ |
|
||||||
48080^48091^ |
|
||||||
48080^48092^ |
|
||||||
48080^48093^ |
|
||||||
48080^48094^ |
|
||||||
48080^48095^ |
|
||||||
48080^48096^ |
|
||||||
48080^48097^ |
|
||||||
48080^48098^ |
|
||||||
48080^48099^ |
|
@ -1 +0,0 @@ |
|||||||
100^48080^ |
|
@ -1,30 +0,0 @@ |
|||||||
48110^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';^ |
|
||||||
48111^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;^ |
|
||||||
48112^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;^ ^ ^ |
|
||||||
48113^Abschluss^40^0^0^100^200^3^char^1500^0^1^<<SQL>> select apnr, druck from cifx where key=35 order by 2;^ ^ ^ |
|
||||||
48114^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^0^^ ^ ^ |
|
||||||
48115^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^^ |
|
||||||
48116^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^999^hs_zugangsber^apnr, eintrag^ ^ |
|
||||||
48117^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;^ |
|
||||||
48118^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;^ ^ ^ |
|
||||||
48119^Studiengang^25^0^0^140^150^50^char^1000^0^12^<<SQL>> select tid,name,-1000 from sichten where name_intern ='sos_kst_fb_stgabint'\ |
|
||||||
union select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^ |
|
||||||
48121^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';^ |
|
||||||
48122^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';^ |
|
||||||
48128^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';^ |
|
||||||
48132^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;^ ^ ^ |
|
||||||
48133^Spalten^3002^0^0^150^190^10^char^30^0^1^<<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;^ ^ ^ |
|
||||||
48134^tablestylesheet^3001^0^0^100^150^1^char^200^1^1^<<SQL>>\ |
|
||||||
select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=48110^ ^<<SQL>>select distinct filename,X.caption from sx_stylesheets X,sx_mask_style S where X.tid=S.stylesheet_id and S.maskeninfo_id=48110 and ord=1^ |
|
@ -1 +0,0 @@ |
|||||||
48110^7^ |
|
@ -1,16 +0,0 @@ |
|||||||
48110^48110^ |
|
||||||
48110^48111^ |
|
||||||
48110^48112^ |
|
||||||
48110^48113^ |
|
||||||
48110^48114^ |
|
||||||
48110^48115^ |
|
||||||
48110^48116^ |
|
||||||
48110^48117^ |
|
||||||
48110^48118^ |
|
||||||
48110^48119^ |
|
||||||
48110^48121^ |
|
||||||
48110^48122^ |
|
||||||
48110^48128^ |
|
||||||
48110^48132^ |
|
||||||
48110^48133^ |
|
||||||
48110^48134^ |
|
@ -1,110 +0,0 @@ |
|||||||
48110^Leistungen und Studiengänge^--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,\ |
|
||||||
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>\ |
|
||||||
</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>\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<@rpta_interpret_column_layout />\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
</#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^Leistungen und Studiengänge^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^48110^ |
|
@ -1,16 +0,0 @@ |
|||||||
48150^Benutzer/in^50^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,nvl(name,benutzer) from userinfo order by 2;^hidden^^ |
|
||||||
48151^Spaltenlayout^10^0^0^150^80^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_column_layout where 1=1 /* and resultset_id=<<Virtuelle Tabelle>> */ order by 2;^hidden^^ |
|
||||||
48152^Spaltenlayouts verwalten^110^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_column_layout_list.jsp' from xdummy;^ |
|
||||||
48153^Name^20^0^0^150^150^1^char^50^0^0^^^^ |
|
||||||
48154^Schlüssel^30^0^0^150^200^1^char^200^0^0^ ^ ^^ |
|
||||||
48155^Virtuelle Tabellen bearbeiten^100^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_resultset_list.jsp' from xdummy;^ |
|
||||||
48156^Virtuelle Tabelle^5^0^0^150^200^1^integer^200^1^1^<<SQL>> select tid,caption from rpta_resultset where 1=1 /* and systeminfo_id=<<Komponente>> */ order by 2;^^^ |
|
||||||
48157^Spaltentyp^200^0^0^150^200^1^integer^200^1^1^<<SQL>> select tid,caption from rpta_column_type order by 2;^^<<SQL>> select tid,caption from rpta_column_type\ |
|
||||||
where uniquename='physicalColumn'^ |
|
||||||
48158^Komponente^1^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,name from systeminfo order by 2;^ ^^ |
|
||||||
48159^Quellfeld^7^0^0^150^200^1^char^200^0^1^<<SQL>> select F.name,coalesce(trim(F.caption),'Feld') || ' (' || trim(F.name) || ')' \ |
|
||||||
from sx_fields F, rpta_resultset R\ |
|
||||||
where F.table_name=R.uniquename\ |
|
||||||
/* and R.tid=<<Virtuelle Tabelle>> */\ |
|
||||||
and currentlyused=1\ |
|
||||||
order by 1^ ^^ |
|
@ -1 +0,0 @@ |
|||||||
48150^330^ |
|
@ -1,10 +0,0 @@ |
|||||||
48150^48150^ |
|
||||||
48150^48151^ |
|
||||||
48150^48152^ |
|
||||||
48150^48153^ |
|
||||||
48150^48154^ |
|
||||||
48150^48155^ |
|
||||||
48150^48156^ |
|
||||||
48150^48157^ |
|
||||||
48150^48158^ |
|
||||||
48150^48159^ |
|
@ -1,122 +0,0 @@ |
|||||||
48150^Spalte anlegen^--Autor: D. Quathamer\ |
|
||||||
--Datum: 15.3.2024\ |
|
||||||
--freemarker template\ |
|
||||||
\ |
|
||||||
create temp table tmp_rpta_column (\ |
|
||||||
ord smallint,\ |
|
||||||
tid INTEGER , \ |
|
||||||
uniquename varchar(255),\ |
|
||||||
caption varchar(255),\ |
|
||||||
srcfieldname varchar(255),\ |
|
||||||
column_type integer,\ |
|
||||||
column_type_str varchar(255),\ |
|
||||||
column_type_uniquename varchar(255),\ |
|
||||||
col_function text,\ |
|
||||||
is_aggregate smallint,\ |
|
||||||
resultset_id integer,\ |
|
||||||
resultset_str varchar(255),\ |
|
||||||
systeminfo_str varchar(255),\ |
|
||||||
custom integer ,\ |
|
||||||
description text,\ |
|
||||||
targetfieldname varchar(255),\ |
|
||||||
nextedit varchar(255)\ |
|
||||||
);\ |
|
||||||
\ |
|
||||||
begin work;\ |
|
||||||
\ |
|
||||||
insert into tmp_rpta_column (--ord,\ |
|
||||||
-- tid,\ |
|
||||||
-- uniquename,\ |
|
||||||
-- caption,\ |
|
||||||
-- srcfieldname,\ |
|
||||||
column_type,\ |
|
||||||
column_type_str,\ |
|
||||||
column_type_uniquename,\ |
|
||||||
-- col_function,\ |
|
||||||
-- is_aggregate,\ |
|
||||||
resultset_id\ |
|
||||||
-- custom,\ |
|
||||||
-- description,\ |
|
||||||
-- targetfieldname,\ |
|
||||||
-- nextedit\ |
|
||||||
) \ |
|
||||||
select \ |
|
||||||
T.tid,\ |
|
||||||
T.caption as column_type_str,\ |
|
||||||
T.uniquename as column_type_uniquename,\ |
|
||||||
<<Virtuelle Tabelle>> as resultset_id\ |
|
||||||
FROM rpta_column_type T \ |
|
||||||
where T.tid=<<Spaltentyp>> \ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
update tmp_rpta_column set resultset_str=R.caption\ |
|
||||||
from rpta_resultset R\ |
|
||||||
where R.tid=tmp_rpta_column.resultset_id;\ |
|
||||||
\ |
|
||||||
/*update tmp_rpta_column set srcfieldname=F.name,\ |
|
||||||
is_aggregate=F.is_sum,\ |
|
||||||
uniquename=F.name,\ |
|
||||||
caption=F.caption\ |
|
||||||
from sx_fields F, rpta_resultset R\ |
|
||||||
where F.table_name=R.uniquename\ |
|
||||||
and R.tid=tmp_rpta_column.resultset_id\ |
|
||||||
and F.name=<<Quellfeld>>\ |
|
||||||
and tmp_rpta_column.column_type_uniquename='physicalColumn'; */\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
/* update tmp_rpta_column set uniquename=<<Schlüssel>>; */\ |
|
||||||
/* update tmp_rpta_column set caption=<<Name>>;*/\ |
|
||||||
\ |
|
||||||
update tmp_rpta_column set uniquename='Created ' || timestamp_str(now())\ |
|
||||||
where uniquename is null;\ |
|
||||||
update tmp_rpta_column set caption='Created ' || timestamp_str(now())\ |
|
||||||
where caption is null;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
select sp_update_sequence('rpta_column');\ |
|
||||||
\ |
|
||||||
insert into rpta_column( uniquename,\ |
|
||||||
caption,\ |
|
||||||
srcfieldname,\ |
|
||||||
column_type,\ |
|
||||||
col_function,\ |
|
||||||
is_aggregate,\ |
|
||||||
resultset_id,\ |
|
||||||
custom,\ |
|
||||||
description,\ |
|
||||||
targetfieldname)\ |
|
||||||
select uniquename,\ |
|
||||||
caption,\ |
|
||||||
srcfieldname,\ |
|
||||||
column_type,\ |
|
||||||
col_function,\ |
|
||||||
is_aggregate,\ |
|
||||||
resultset_id,\ |
|
||||||
custom,\ |
|
||||||
description,\ |
|
||||||
targetfieldname\ |
|
||||||
from tmp_rpta_column;\ |
|
||||||
\ |
|
||||||
update tmp_rpta_column set tid=currval('rpta_column_tid_seq');\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
commit;\ |
|
||||||
\ |
|
||||||
select 'Ergebnis' as s1, \ |
|
||||||
' Eintrag angelegt:' || coalesce(C.caption,'Unbenannt') || ' (' || coalesce(C.uniquename,'TID: ' || C.tid::varchar) || ') [' || C.column_type_str || ']' as ergebnis2,\ |
|
||||||
'../edit/rpta/rpta_column_edit.jsp|tid=' || C.tid as nextedit\ |
|
||||||
from tmp_rpta_column C\ |
|
||||||
;^XIL List\ |
|
||||||
drop_and_delete movable_columns sizable_columns horizontal_scrolling\ |
|
||||||
white_space_color=COLOR_WHITE fixed_columns=2\ |
|
||||||
min_heading_height=35\ |
|
||||||
Column CID=0 heading_text="Ergebnis" center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=50 text_size=100\ |
|
||||||
Column CID=0 heading_text="Spalte" center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=50 text_size=100\ |
|
||||||
Column CID=1 heading_text="Bearbeiten" center_heading\ |
|
||||||
row_selectable col_selectable heading_platform readonly\ |
|
||||||
width=5 text_size=200\ |
|
||||||
@@@^^^Spaltendefinitionen anlegen^drop table tmp_rpta_column;^^1^440^360^0^1^ ^ |
|
@ -1 +0,0 @@ |
|||||||
331^48150^ |
|
@ -1,35 +0,0 @@ |
|||||||
48180^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='sos_stud_astat'\ |
|
||||||
and R.systeminfo_id=7)\ |
|
||||||
and is_virtual=0\ |
|
||||||
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='sos_stud_astat'\ |
|
||||||
and R.systeminfo_id=7)\ |
|
||||||
and is_virtual=0\ |
|
||||||
order by sortnr, caption\ |
|
||||||
limit 1^ |
|
||||||
48181^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;^ |
|
||||||
48182^Fächer^30^0^0^130^200^6^integer^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^ |
|
||||||
48183^Abschluss^40^0^0^100^200^3^char^1500^0^1^<<SQL>> select apnr, druck from cifx where key=35 order by 2;^ ^ ^ |
|
||||||
48184^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^0^^ ^ ^ |
|
||||||
48185^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^ |
|
||||||
48186^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^1^hs_zugangsber^ ^ ^ |
|
||||||
48187^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;^ |
|
||||||
48188^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;^ ^ ^ |
|
||||||
48189^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;^ ^ ^ |
|
||||||
48190^Semester^100^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^hidden^ ^ |
|
||||||
48191^Stichtag^23^330^-1^130^100^1^sql^30^0^1^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^hidden^ ^ |
|
||||||
48192^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';^ |
|
||||||
48193^Jahr^110^0^0^140^80^1^integer^30^0^13^^ ^ ^ |
|
||||||
48194^Filter Studierende^100^0^0^140^150^1^sql^20^0^1^<<SQL>> SELECT id,caption from sx_repository where aktiv =1 and today() between gueltig_seit and gueltig_bis and art='SOS_STUD_FILTER' order by 2;^ ^ ^ |
|
||||||
48195^Nur Endsemester^21^0^0^140^80^1^integer^30^0^1^<<SQL>> select 1,'ja' from xdummy^Eintrag^ ^ |
|
||||||
48198^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^ ^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^ |
|
||||||
48202^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;^ ^ ^ |
|
||||||
48203^Spalten^3001^0^0^150^190^10^char^30^0^1^<<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;^ ^ ^ |
|
@ -1 +0,0 @@ |
|||||||
48180^7^ |
|
@ -1,19 +0,0 @@ |
|||||||
48180^48180^ |
|
||||||
48180^48181^ |
|
||||||
48180^48182^ |
|
||||||
48180^48183^ |
|
||||||
48180^48184^ |
|
||||||
48180^48185^ |
|
||||||
48180^48186^ |
|
||||||
48180^48187^ |
|
||||||
48180^48188^ |
|
||||||
48180^48189^ |
|
||||||
48180^48190^ |
|
||||||
48180^48191^ |
|
||||||
48180^48192^ |
|
||||||
48180^48193^ |
|
||||||
48180^48194^ |
|
||||||
48180^48195^ |
|
||||||
48180^48198^ |
|
||||||
48180^48202^ |
|
||||||
48180^48203^ |
|
@ -1,272 +0,0 @@ |
|||||||
48180^Tabellenausgabe Studierende (amtlich und intern) (optimiert)^--Freemarker Template\ |
|
||||||
<#include "SQL_lingua_franca"/>\ |
|
||||||
<#include "SuperX_general"/>\ |
|
||||||
--\ |
|
||||||
--Autor D. Quathamer 2024\ |
|
||||||
<sqlvars>\ |
|
||||||
<sqlvar name="column_layout" type="hash"><![CDATA[\ |
|
||||||
select R.uniquename as resultset_uniquename,\ |
|
||||||
L.uniquename,\ |
|
||||||
L.caption,\ |
|
||||||
L.whereclause,\ |
|
||||||
L.is_virtual\ |
|
||||||
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[\ |
|
||||||
<#if column_layout.is_virtual==1>\ |
|
||||||
SELECT distinct T.name,\ |
|
||||||
1::smallint as is_virtual,\ |
|
||||||
name as runtime_tablename\ |
|
||||||
from sx_tables T, rpta_resultset R \ |
|
||||||
where T.name=R.uniquename\ |
|
||||||
and T.name='${column_layout.resultset_uniquename}'\ |
|
||||||
<#else> \ |
|
||||||
select L.uniquename,\ |
|
||||||
L.is_virtual,\ |
|
||||||
L.uniquename as runtime_tablename\ |
|
||||||
from rpta_column_layout L where L.uniquename='${column_layout.uniquename}'\ |
|
||||||
;\ |
|
||||||
</#if>\ |
|
||||||
]]>\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="rpta_resultset" type="hash"><![CDATA[\ |
|
||||||
select caption,\ |
|
||||||
uniquename,\ |
|
||||||
fieldclause,\ |
|
||||||
joinclause,\ |
|
||||||
whereclause,\ |
|
||||||
systeminfo_id\ |
|
||||||
from rpta_resultset\ |
|
||||||
where uniquename='${basetable.runtime_tablename}';\ |
|
||||||
\ |
|
||||||
]]></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 >= <<Seit Semester>> */\ |
|
||||||
/* and tid <= <<Bis Semester>> */\ |
|
||||||
<#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_rueck_beur_ein 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_rueck_beur_ein 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 semester_filter ="1=1\ |
|
||||||
/* and sem_rueck_beur_ein >= <<Seit Semester>> */\ |
|
||||||
/* and sem_rueck_beur_ein <= <<Bis Semester>> */\ |
|
||||||
" />\ |
|
||||||
<#if "<<Semestertyp>>"="1" || "<<Semestertyp>>"="2">\ |
|
||||||
<#assign semester_filter = semester_filter+ " and substring('' || sem_rueck_beur_ein from 5 for 1)='<<Semestertyp>>'" />\ |
|
||||||
</#if>\ |
|
||||||
<#if "<<Nur Endsemester>>"="1">\ |
|
||||||
--nur Endsemester\ |
|
||||||
<#assign semester_filter = semester_filter+ " and 1=1 and sem_rueck_beur_ein = "+endsemester /> \ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#if basetable.is_virtual==1>\ |
|
||||||
\ |
|
||||||
<#assign filter="<<Köpfe oder Fälle ?>>\ |
|
||||||
/* and sem_rueck_beur_ein = <<Semester>> */\ |
|
||||||
/* and stichtag = <<Stichtag>> */\ |
|
||||||
/* and <<Hochschulzugangsberechtigung>> */\ |
|
||||||
/* and <<Hörerstatus>>*/\ |
|
||||||
/* and abschluss in (<<Abschluss>>) */\ |
|
||||||
/* and geschlecht = <<Geschlecht>> */\ |
|
||||||
/* and fach_sem_zahl <= <<bis Fachsemester>> */\ |
|
||||||
/* and substring('' || sem_rueck_beur_ein from 5 for 1)='<<Semestertyp>>' */\ |
|
||||||
/* and ${<<Filter Studierende>>} */\ |
|
||||||
" />\ |
|
||||||
\ |
|
||||||
<#else>\ |
|
||||||
<#assign filter="1=1" />\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + " and " + jahr_filter />\ |
|
||||||
\ |
|
||||||
<#assign filter= filter + " and " + semester_filter />\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#assign filter = filter + " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \ |
|
||||||
/* <#assign filter = filter + " and '' || ca12_staat in "+Staatsangehörigkeit.allNeededKeysList /> --<<Staatsangehörigkeit>> */\ |
|
||||||
/* <#assign filter = filter + " and stg in "+Fächer.allNeededKeysList /> --<<Fächer>> */\ |
|
||||||
\ |
|
||||||
<#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}\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
select \ |
|
||||||
--zuerst die Basisdaten:\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if column.coltype="physicalColumn">\ |
|
||||||
${column.srcfieldname},\ |
|
||||||
<#elseif column.coltype="logicalColumn">\ |
|
||||||
${column.colfunction} as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype="lookupColumn">\ |
|
||||||
(${column.colfunction}) as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype="computedColumn">\ |
|
||||||
null::decimal(19,6) as ${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_rs\ |
|
||||||
from ${basetable.runtime_tablename}\ |
|
||||||
where 1=1\ |
|
||||||
<#if rpta_column_layout.whereclause !="">\ |
|
||||||
and ${rpta_column_layout.whereclause}\ |
|
||||||
</#if>\ |
|
||||||
<#if rpta_column_layout.is_virtual ==0>\ |
|
||||||
and ${filter}\ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
<#else>\ |
|
||||||
--wenn column_layout.is_virtual=0,\ |
|
||||||
--also die Tabelle ist schon da:\ |
|
||||||
<#assign groupby=0 />\ |
|
||||||
\ |
|
||||||
select <#foreach column in columns>\ |
|
||||||
<#if column.is_aggregate==1 && column.coltype!="computedColumn">\ |
|
||||||
sum(${column.targetfieldname}) as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype="computedColumn">\ |
|
||||||
null::float as ${column.targetfieldname},\ |
|
||||||
<#elseif column.is_visible==1>\ |
|
||||||
<#assign groupby=groupby+1 />\ |
|
||||||
${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_rs\ |
|
||||||
from ${basetable.runtime_tablename}\ |
|
||||||
where ${filter}\ |
|
||||||
<#if groupby !=0 >\ |
|
||||||
group by\ |
|
||||||
<#list 1..groupby as i>${i}\ |
|
||||||
<#if i != groupby>\ |
|
||||||
,\ |
|
||||||
</#if>\ |
|
||||||
</#list>\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
</#if>\ |
|
||||||
--ergebnistabelle:\ |
|
||||||
select \ |
|
||||||
--die Aggregate:\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if column.is_aggregate==1 && column.coltype!="computedColumn">\ |
|
||||||
sum(${column.targetfieldname}) as ${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_gesamt\ |
|
||||||
from tmp_rs\ |
|
||||||
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_rs\ |
|
||||||
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_rs;\ |
|
||||||
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^Datenblatt Studierendenstatistik^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^48180^ |
|
@ -1,39 +0,0 @@ |
|||||||
48220^Studiengang^39^0^0^150^200^6^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('MAN-STG-Kostenstellen-Sicht','MAN-Studiengang-Sicht') and aktiv=1 order by 3,2;^^^ |
|
||||||
48221^Kennzahl^100^0^0^150^200^1^char^255^1^1^<<SQL>> select C.id,trim(C.name) || ' - (' || C.id || ')',P.sortnr,P.sortnr2\ |
|
||||||
from man_reports R,man_catalogue_rpt P, man_catalogue C\ |
|
||||||
where C.id=P.catalogue_id\ |
|
||||||
and R.id=P.report_id\ |
|
||||||
/* and P.report_id=<<Bericht>>*/\ |
|
||||||
and P.active>=1\ |
|
||||||
and R.active=1\ |
|
||||||
and C.timeunit='S'\ |
|
||||||
and C.calcratio=0\ |
|
||||||
and C.cacheing>0\ |
|
||||||
order by 3,4,2^^^ |
|
||||||
48222^Institution^2^0^0^150^200^1^char^30^0^12^<<SQL>>select tid,type,name from sichten where art ='MAN-Kostenstellen-Sicht' and aktiv=1 order by type,name;^^^ |
|
||||||
48223^Start-Jahr^4^0^0^100^50^1^integer^30^0^1^<<SQL>> SELECT distinct tid,druck FROM man_jahr order by 1;^^<<SQL>> SELECT tid,druck FROM man_jahr where tid=(year(today())-5) ;^ |
|
||||||
48224^Startsemester^7^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from man_semester order by tid DESC;^^^ |
|
||||||
48225^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^ |
|
||||||
48226^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_man_kennz_aggr'\ |
|
||||||
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_man_kennz_aggr'\ |
|
||||||
and R.systeminfo_id=200) and uniquename='man_kennz_aggr_studiengang';^ |
|
||||||
48227^Spalten^3001^0^0^150^190^10^char^30^0^1^<<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;^^^ |
|
||||||
48228^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^ |
|
||||||
48229^Ausgabeformat^2001^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';^ |
|
||||||
48230^Endsemester^8^0^0^140^100^1^integer^30^0^1^<<SQL>> select tid, eintrag from man_semester order by tid DESC;^^^ |
|
||||||
48231^End-Jahr^5^0^0^100^50^1^integer^30^0^1^<<SQL>> SELECT distinct tid,druck FROM man_jahr order by 1;^^<<SQL>> SELECT tid,druck FROM man_jahr where tid=(year(today())-1) ;^ |
|
||||||
48232^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^ |
|
||||||
48233^Bericht^1^0^0^150^200^1^char^30^1^1^<<SQL>> select R.id,trim(R.name) || ' - (' || R.id || ')' from man_reports R where 0<(select count(*) from man_catalogue_rpt P, man_catalogue C\ |
|
||||||
where C.id=P.catalogue_id\ |
|
||||||
and C.fromclause is not null\ |
|
||||||
and P.report_id=R.id) and R.active=1 order by 2^^<<SQL>> select id,name || ' - (' || id || ')' from man_reports where id='${MAN_DEFAULT_REPORT}' and active=1;^ |
|
@ -1 +0,0 @@ |
|||||||
48220^200^ |
|
@ -1,14 +0,0 @@ |
|||||||
48220^48220^ |
|
||||||
48220^48221^ |
|
||||||
48220^48222^ |
|
||||||
48220^48223^ |
|
||||||
48220^48224^ |
|
||||||
48220^48225^ |
|
||||||
48220^48226^ |
|
||||||
48220^48227^ |
|
||||||
48220^48228^ |
|
||||||
48220^48229^ |
|
||||||
48220^48230^ |
|
||||||
48220^48231^ |
|
||||||
48220^48232^ |
|
||||||
48220^48233^ |
|
@ -1,282 +0,0 @@ |
|||||||
48220^Management-Bericht 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\ |
|
||||||
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>\ |
|
||||||
<sqlvar name="timeunit">\ |
|
||||||
select K.timeunit\ |
|
||||||
from man_catalogue K\ |
|
||||||
where \ |
|
||||||
K.id = <<Kennzahl>> \ |
|
||||||
;\ |
|
||||||
</sqlvar>\ |
|
||||||
<sqlvar name="calcratio">\ |
|
||||||
select K.calcratio\ |
|
||||||
from man_catalogue K\ |
|
||||||
where \ |
|
||||||
K.id = <<Kennzahl>> \ |
|
||||||
;\ |
|
||||||
</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 geschlecht=<<Geschlecht>> */\ |
|
||||||
/* and catalogue_id=<<Kennzahl>> */\ |
|
||||||
" />\ |
|
||||||
<#if timeunit='S'>\ |
|
||||||
<#assign filter = filter + " \ |
|
||||||
/* and sem >= <<Startsemester>> */\ |
|
||||||
/* and sem <= <<Endsemester>> */\ |
|
||||||
"/> \ |
|
||||||
</#if>\ |
|
||||||
<#if timeunit='J'>\ |
|
||||||
<#assign filter = filter + " \ |
|
||||||
/* and jahr >= <<Start-Jahr>> */\ |
|
||||||
/* and jahr <= <<End-Jahr>> */\ |
|
||||||
"/> \ |
|
||||||
</#if>\ |
|
||||||
\ |
|
||||||
<#assign institutionparam="" />\ |
|
||||||
/* <#assign institutionparam=<<Institution>> /> */\ |
|
||||||
<#assign studiengangparam="" />\ |
|
||||||
/* <#assign studiengangparam="<<Studiengang>>" /> */\ |
|
||||||
\ |
|
||||||
--Rechte prüfen:\ |
|
||||||
--SQL Fehler () abfangen:\ |
|
||||||
<#assign instRechteList=Institution.allNeededKeysList />\ |
|
||||||
<#assign studiengangRechteList=Studiengang.allNeededKeysList />\ |
|
||||||
<#if instRechteList=="()">\ |
|
||||||
<#assign instRechteList="('-9xy!')" />\ |
|
||||||
</#if>\ |
|
||||||
<#if studiengangRechteList=="()">\ |
|
||||||
<#assign studiengangRechteList="('-9xy!')" />\ |
|
||||||
</#if>\ |
|
||||||
--zuerst Rechte prüfen:\ |
|
||||||
<#assign filter = filter + " and (1!=1 or ch110_institut in "+instRechteList+" or studiengang in "+studiengangRechteList+" )" />\ |
|
||||||
--jetzt Selektion Inst/Studiengang mit höherer Priorität: \ |
|
||||||
<#if institutionparam !="" && institutionparam !="'root'">\ |
|
||||||
<#assign filter = filter + " and ch110_institut in "+.vars["Institution"].allNeededKeys /> \ |
|
||||||
</#if>\ |
|
||||||
/* <#assign filter = filter + " and studiengang in "+.vars["Studiengang"].allNeededKeys /> --<<Studiengang>>*/ \ |
|
||||||
\ |
|
||||||
\ |
|
||||||
<#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},\ |
|
||||||
<#elseif column.coltype="logicalColumn">\ |
|
||||||
${column.colfunction} as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype="lookupColumn">\ |
|
||||||
(${column.colfunction}) as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype="computedColumn">\ |
|
||||||
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>\ |
|
||||||
<#if column.is_aggregate==0>\ |
|
||||||
<#assign groupby=groupby+1 />\ |
|
||||||
${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
--dann die Aggregate:\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if column.is_aggregate==1 && column.coltype!="computedColumn">\ |
|
||||||
sum(${column.targetfieldname}) 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">\ |
|
||||||
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_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>\ |
|
||||||
@@@^^^Ü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>>;^ |
|
@ -1 +0,0 @@ |
|||||||
200^48220^ |
|
@ -1,65 +0,0 @@ |
|||||||
#!/bin/bash |
|
||||||
|
|
||||||
#Arbeitsverzeichnis fuer crontab |
|
||||||
PFAD=$2 |
|
||||||
if [ "$PFAD" != "" ] |
|
||||||
then |
|
||||||
|
|
||||||
cd $PFAD |
|
||||||
|
|
||||||
fi |
|
||||||
#Umgebung einlesen: |
|
||||||
if [ "$RPTA_PFAD" = "" ] |
|
||||||
then |
|
||||||
echo "ACHTUNG: Die Umgebungsvariable RPTA_PFAD ist nicht gesetzt. Bitte prüfen Sie $SUPERX_DIR/db/bin/SQL_ENV" |
|
||||||
|
|
||||||
exit 1 |
|
||||||
|
|
||||||
fi |
|
||||||
if [ "$RPTA_ERRORMAIL" != "" ] |
|
||||||
then |
|
||||||
ERRORMAIL=$RPTA_ERRORMAIL |
|
||||||
export ERRORMAIL |
|
||||||
fi |
|
||||||
if [ "$RPTA_LOGMAIL" != "" ] |
|
||||||
then |
|
||||||
LOGMAIL=$RPTA_LOGMAIL |
|
||||||
export LOGMAIL |
|
||||||
fi |
|
||||||
if [ "$RPTA_BACKUP" != "" ] |
|
||||||
then |
|
||||||
MODULE_BACKUP=$RPTA_BACKUP |
|
||||||
export MODULE_BACKUP |
|
||||||
fi |
|
||||||
|
|
||||||
#hier geht es los |
|
||||||
#runAndCheck.x path command (EXIT_ON_ERROR|CONT_ON_ERROR) (SEND_ERRORMAIL|NO_ERRORMAIL) (SEND_LOGMAIL|NO_LOGMAIL) [description] " |
|
||||||
echo "rpta-Update startet" >$RPTA_ERRORDAT |
|
||||||
#Tagesdatum für Systeminfo |
|
||||||
date +'%d.%m.%Y' > $RPTA_LOAD_PFAD/superx.datum |
|
||||||
|
|
||||||
runAndCheck.x $RPTA_PFAD "module_etl.x rpta $RPTA_PFAD $RPTA_LOAD_PFAD" EXIT_ON_ERROR SEND_ERRORMAIL SEND_LOGMAIL "RPTA update$MANDANTID" |
|
||||||
cat $RPTA_PFAD/L_RPTA_update$MANDANTID.log >>$RPTA_ERRORDAT |
|
||||||
|
|
||||||
|
|
||||||
fgrep -s "not found" $RPTA_ERRORDAT |
|
||||||
FLAG1=$? |
|
||||||
fgrep -i -s "error" $RPTA_ERRORDAT |
|
||||||
FLAG2=$? |
|
||||||
fgrep -i -s "nicht gefunden" $RPTA_ERRORDAT |
|
||||||
FLAG3=$? |
|
||||||
if [ $FLAG1 -eq 0 -o $FLAG2 -eq 0 -o $FLAG3 -eq 0 ] |
|
||||||
then |
|
||||||
echo "Fehler beim RPTA-Update " |
|
||||||
echo "---------------------------------------" |
|
||||||
echo "Fehlerprotokoll in $RPTA_ERRORDAT" |
|
||||||
echo "---------------------------------------" |
|
||||||
cp $RPTA_LOAD_PFAD/superx.datum.alt $RPTA_LOAD_PFAD/superx.datum |
|
||||||
else |
|
||||||
echo "RPTA-Update erfolgreich" |
|
||||||
fi |
|
||||||
|
|
||||||
echo "---------------------------Beginn Prüfroutine-----------------------------------" >>$RPTA_ERRORDAT |
|
||||||
#cat $RPTA_PFAD/L_rpta_Test$MANDANTID.log >>$RPTA_ERRORDAT |
|
||||||
pruefmail.x $RPTA_PFAD/L_rpta_Test$MANDANTID.log $ERRORMAIL |
|
||||||
|
|
@ -1,384 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_lab_aggr_exists"> |
|
||||||
select sp_table_exists('sos_lab_aggr') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='sos_lab_aggr' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"> |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'dim_studiengang.tid=sos_lab_aggr.tid_stg' as joinclause |
|
||||||
from sx_tables where name in ('dim_studiengang') |
|
||||||
order by 1 |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'${added_table.prefix}' || name as targetname |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if sos_lab_aggr_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"rpta_sos_lab_aggr", "caption":"Absolvierende"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='sos_lab_aggr' |
|
||||||
and name!='summe'; |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='sos_lab_aggr' |
|
||||||
and name='summe'; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
7 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>', |
|
||||||
whereclause='and stichtag=(select ST.tid from sos_stichtag ST where ST.appl_key=''2'') and abschnitt=2 and pstatus=''BE'''; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn sos_lab_aggr_exists=1 |
|
@ -1,386 +0,0 @@ |
|||||||
116^RPTA-Makros^<#macro rpta_column_layout_fuellen>\ |
|
||||||
CREATE temp TABLE tmp_rpta_column\ |
|
||||||
(\ |
|
||||||
uniquename varchar(255) NOT NULL,\ |
|
||||||
caption varchar(255),\ |
|
||||||
caption_in_ergebnistabelle varchar(255),\ |
|
||||||
srcfieldname varchar(255),\ |
|
||||||
targetfieldname varchar(255),\ |
|
||||||
column_type integer,\ |
|
||||||
col_function text,\ |
|
||||||
is_visible smallint,\ |
|
||||||
visible_size smallint,\ |
|
||||||
is_aggregate smallint,\ |
|
||||||
resultset_id integer,\ |
|
||||||
sortnr integer,\ |
|
||||||
description TEXT,\ |
|
||||||
description_in_ergebnistabelle TEXT,\ |
|
||||||
format_code_uniquename varchar(255),\ |
|
||||||
format_code_id integer\ |
|
||||||
);\ |
|
||||||
\ |
|
||||||
CREATE temp TABLE tmp_rpta_column_layout\ |
|
||||||
(\ |
|
||||||
uniquename varchar(255) NOT NULL,\ |
|
||||||
caption varchar(255),\ |
|
||||||
resultset_id integer,\ |
|
||||||
whereclause text,\ |
|
||||||
sortclause text,\ |
|
||||||
description text,\ |
|
||||||
is_virtual smallint default 1\ |
|
||||||
);\ |
|
||||||
\ |
|
||||||
insert into tmp_rpta_column_layout(\ |
|
||||||
resultset_id,\ |
|
||||||
uniquename,\ |
|
||||||
caption,\ |
|
||||||
whereclause,\ |
|
||||||
<#if rpta_column_layout.sortclause?has_content>\ |
|
||||||
sortclause,\ |
|
||||||
</#if>\ |
|
||||||
<#if rpta_column_layout.is_virtual?has_content>\ |
|
||||||
is_virtual,\ |
|
||||||
</#if>\ |
|
||||||
description\ |
|
||||||
)\ |
|
||||||
select tid,\ |
|
||||||
'${rpta_column_layout.uniquename}',\ |
|
||||||
'${rpta_column_layout.caption}',\ |
|
||||||
'${rpta_column_layout.whereclause}',\ |
|
||||||
<#if rpta_column_layout.sortclause?has_content>\ |
|
||||||
'${rpta_column_layout.sortclause}',\ |
|
||||||
</#if>\ |
|
||||||
<#if rpta_column_layout.is_virtual?has_content>\ |
|
||||||
'${rpta_column_layout.is_virtual}',\ |
|
||||||
</#if>\ |
|
||||||
'${rpta_column_layout.description}'\ |
|
||||||
FROM rpta_resultset\ |
|
||||||
where uniquename='${rpta_column_layout.rpta_resultset}';\ |
|
||||||
\ |
|
||||||
<#assign sortnr=0 />\ |
|
||||||
<#foreach column in rpta_columns>\ |
|
||||||
<#assign sortnr=sortnr +1 />\ |
|
||||||
\ |
|
||||||
INSERT INTO tmp_rpta_column\ |
|
||||||
(resultset_id,\ |
|
||||||
uniquename,\ |
|
||||||
caption,\ |
|
||||||
caption_in_ergebnistabelle,\ |
|
||||||
srcfieldname,\ |
|
||||||
targetfieldname,\ |
|
||||||
column_type,\ |
|
||||||
col_function,\ |
|
||||||
is_visible,\ |
|
||||||
visible_size,\ |
|
||||||
is_aggregate,\ |
|
||||||
sortnr,\ |
|
||||||
description,\ |
|
||||||
description_in_ergebnistabelle,\ |
|
||||||
format_code_uniquename\ |
|
||||||
)\ |
|
||||||
select R.tid,\ |
|
||||||
'${column.uniquename}',\ |
|
||||||
<#if column.caption?exists>\ |
|
||||||
'${column.caption}',\ |
|
||||||
<#else>\ |
|
||||||
'${column.caption_der_spalte}',\ |
|
||||||
</#if>\ |
|
||||||
<#if column.caption_in_ergebnistabelle?exists>\ |
|
||||||
'${column.caption_in_ergebnistabelle}',\ |
|
||||||
<#else>\ |
|
||||||
'${column.caption}',\ |
|
||||||
</#if>\ |
|
||||||
'${column.srcfieldname}',\ |
|
||||||
<#if !column.targetfieldname?exists || column.targetfieldname=="">'${column.srcfieldname}' <#else>'${column.targetfieldname}' </#if>,\ |
|
||||||
T.tid as column_type,\ |
|
||||||
<#if column.col_function?exists>'${column.col_function}'<#else>null::varchar </#if>,\ |
|
||||||
${column.is_visible},\ |
|
||||||
${column.visible_size},\ |
|
||||||
${column.is_aggregate},\ |
|
||||||
${sortnr*10},\ |
|
||||||
<#if column.description?exists>'${column.description}'<#elseif column.description_der_spalte?exists>'${column.description_der_spalte}'<#else>null::varchar </#if>,\ |
|
||||||
<#if column.description_in_ergebnistabelle?exists>'${column.description_in_ergebnistabelle}'<#elseif column.description?exists>'${column.description}'<#else>null::varchar </#if>,\ |
|
||||||
<#if column.format_code?exists>'${column.format_code}'<#else>null::varchar </#if>\ |
|
||||||
FROM rpta_resultset R, rpta_column_type T\ |
|
||||||
where R.uniquename='${rpta_column_layout.rpta_resultset}'\ |
|
||||||
and T.uniquename='${column.column_type}';\ |
|
||||||
\ |
|
||||||
</#foreach>\ |
|
||||||
\ |
|
||||||
update tmp_rpta_column set format_code_id=C.tid\ |
|
||||||
from rpta_format_code C\ |
|
||||||
where C.uniquename=tmp_rpta_column.format_code_uniquename\ |
|
||||||
and format_code_uniquename is not null;\ |
|
||||||
\ |
|
||||||
\ |
|
||||||
select * into temp tmp_rpta_column2layout\ |
|
||||||
from rpta_column2layout\ |
|
||||||
where layout_id in (select L.tid\ |
|
||||||
from rpta_column_layout L,rpta_resultset R\ |
|
||||||
where R.tid=L.resultset_id \ |
|
||||||
and R.uniquename='${rpta_column_layout.rpta_resultset}'\ |
|
||||||
and L.uniquename='${rpta_column_layout.uniquename}'\ |
|
||||||
)\ |
|
||||||
; \ |
|
||||||
\ |
|
||||||
select uniquename into temp tmp_rpta_column_layout_target\ |
|
||||||
from rpta_column_layout\ |
|
||||||
where resultset_id in (select tid\ |
|
||||||
FROM rpta_resultset\ |
|
||||||
where uniquename='${rpta_column_layout.rpta_resultset}')\ |
|
||||||
and uniquename in (select uniquename from tmp_rpta_column_layout)\ |
|
||||||
;\ |
|
||||||
--falls neu\ |
|
||||||
insert into rpta_column_layout\ |
|
||||||
(uniquename,\ |
|
||||||
caption,\ |
|
||||||
resultset_id,\ |
|
||||||
whereclause,\ |
|
||||||
<#if rpta_column_layout.sortclause?has_content>\ |
|
||||||
sortclause,\ |
|
||||||
</#if>\ |
|
||||||
description,\ |
|
||||||
is_virtual)\ |
|
||||||
select uniquename,\ |
|
||||||
caption,\ |
|
||||||
resultset_id,\ |
|
||||||
whereclause,\ |
|
||||||
<#if rpta_column_layout.sortclause?has_content>\ |
|
||||||
sortclause,\ |
|
||||||
</#if>\ |
|
||||||
description,\ |
|
||||||
is_virtual\ |
|
||||||
FROM tmp_rpta_column_layout T\ |
|
||||||
where not exists (select uniquename from tmp_rpta_column_layout_target);\ |
|
||||||
\ |
|
||||||
--falls geändert, uniquename muss bleiben\ |
|
||||||
update rpta_column_layout\ |
|
||||||
set (caption, resultset_id, whereclause,<#if rpta_column_layout.sortclause?has_content>sortclause,</#if> description, is_virtual)\ |
|
||||||
= ( select caption, resultset_id,\ |
|
||||||
whereclause,\ |
|
||||||
<#if rpta_column_layout.sortclause?has_content>\ |
|
||||||
sortclause,\ |
|
||||||
</#if>\ |
|
||||||
description,\ |
|
||||||
is_virtual\ |
|
||||||
FROM tmp_rpta_column_layout T\ |
|
||||||
where T.uniquename=rpta_column_layout.uniquename)\ |
|
||||||
where rpta_column_layout.uniquename=(select uniquename from tmp_rpta_column_layout);\ |
|
||||||
\ |
|
||||||
drop table tmp_rpta_column_layout_target;\ |
|
||||||
\ |
|
||||||
delete from rpta_column2layout\ |
|
||||||
where layout_id in (select L.tid\ |
|
||||||
from rpta_column_layout L,rpta_resultset R\ |
|
||||||
where R.tid=L.resultset_id \ |
|
||||||
and R.uniquename='${rpta_column_layout.rpta_resultset}'\ |
|
||||||
and L.uniquename='${rpta_column_layout.uniquename}'\ |
|
||||||
)\ |
|
||||||
; \ |
|
||||||
\ |
|
||||||
select * into temp tmp_rpta_column2 \ |
|
||||||
from tmp_rpta_column T \ |
|
||||||
where (resultset_id,uniquename) not in\ |
|
||||||
(select resultset_id,uniquename from rpta_column);\ |
|
||||||
\ |
|
||||||
INSERT INTO rpta_column\ |
|
||||||
(resultset_id,\ |
|
||||||
uniquename,\ |
|
||||||
caption,\ |
|
||||||
srcfieldname,\ |
|
||||||
targetfieldname,\ |
|
||||||
column_type,\ |
|
||||||
col_function,\ |
|
||||||
is_aggregate,\ |
|
||||||
description,\ |
|
||||||
custom\ |
|
||||||
)\ |
|
||||||
select \ |
|
||||||
resultset_id,\ |
|
||||||
uniquename,\ |
|
||||||
caption,\ |
|
||||||
srcfieldname,\ |
|
||||||
targetfieldname,\ |
|
||||||
column_type,\ |
|
||||||
col_function,\ |
|
||||||
is_aggregate,\ |
|
||||||
description,\ |
|
||||||
0 as custom\ |
|
||||||
from tmp_rpta_column2; \ |
|
||||||
\ |
|
||||||
--evtl. neuen Satz einfügen, dann alle updaten\ |
|
||||||
\ |
|
||||||
update rpta_column set ( caption,\ |
|
||||||
srcfieldname,\ |
|
||||||
targetfieldname,\ |
|
||||||
column_type,\ |
|
||||||
col_function,\ |
|
||||||
is_aggregate,\ |
|
||||||
description)\ |
|
||||||
= (select caption,\ |
|
||||||
srcfieldname,\ |
|
||||||
targetfieldname,\ |
|
||||||
column_type,\ |
|
||||||
col_function,\ |
|
||||||
is_aggregate,\ |
|
||||||
description\ |
|
||||||
from tmp_rpta_column T\ |
|
||||||
where T.resultset_id=rpta_column.resultset_id\ |
|
||||||
and T.uniquename=rpta_column.uniquename)\ |
|
||||||
where custom=0\ |
|
||||||
and (resultset_id,uniquename) in\ |
|
||||||
(select T.resultset_id,T.uniquename\ |
|
||||||
from tmp_rpta_column T)\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
drop table tmp_rpta_column2;\ |
|
||||||
\ |
|
||||||
insert into rpta_column2layout(column_id,\ |
|
||||||
layout_id,\ |
|
||||||
sortnr,\ |
|
||||||
is_visible,\ |
|
||||||
visible_size,\ |
|
||||||
caption,\ |
|
||||||
description,\ |
|
||||||
format_code_id)\ |
|
||||||
select C.tid as column_id,\ |
|
||||||
L.tid as layout_id,\ |
|
||||||
T.sortnr,\ |
|
||||||
T.is_visible,\ |
|
||||||
T.visible_size,\ |
|
||||||
T.caption_in_ergebnistabelle,\ |
|
||||||
T.description_in_ergebnistabelle,\ |
|
||||||
T.format_code_id\ |
|
||||||
FROM rpta_column C, rpta_column_layout L, tmp_rpta_column T\ |
|
||||||
where C.uniquename=T.uniquename\ |
|
||||||
and C.resultset_id=T.resultset_id\ |
|
||||||
and L.uniquename='${rpta_column_layout.uniquename}'\ |
|
||||||
and L.resultset_id=T.resultset_id\ |
|
||||||
;\ |
|
||||||
drop table tmp_rpta_column;\ |
|
||||||
drop TABLE tmp_rpta_column_layout;\ |
|
||||||
drop TABLE tmp_rpta_column2layout;\ |
|
||||||
</#macro>\ |
|
||||||
\ |
|
||||||
<#macro rpta_interpret_column_layout>\ |
|
||||||
select \ |
|
||||||
--zuerst die Basisdaten:\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if column.coltype=="physicalColumn">\ |
|
||||||
${column.srcfieldname} as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype=="logicalColumn">\ |
|
||||||
${column.colfunction} as ${column.targetfieldname},\ |
|
||||||
<#elseif column.coltype=="preparingColumn">\ |
|
||||||
${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 />\ |
|
||||||
-- preparingColumns ausgeschlossen, da sie von processingColumns aggregiert werden\ |
|
||||||
-- computedColumns immer mitnehmen, da später im finalen select verarbeitet\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if (column.is_aggregate==0 && column.coltype!="preparingColumn" && 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:\ |
|
||||||
-- preparingColumns ausgeschlossen, da sie von processingColumns aggregiert werden\ |
|
||||||
-- computedColumns ausgeschlossen, da später im finalen select verarbeitet\ |
|
||||||
<#foreach column in columns>\ |
|
||||||
<#if column.is_aggregate==1 \ |
|
||||||
&& column.colfunction?has_content \ |
|
||||||
&& column.coltype=="processingColumn"> \ |
|
||||||
${column.colfunction} as ${column.targetfieldname},\ |
|
||||||
<#elseif column.is_aggregate==1 \ |
|
||||||
&& (column.coltype == "logicalColumn" || column.coltype == "lookupColumn" || column.coltype == "physicalColumn")> \ |
|
||||||
sum(${column.targetfieldname}) as ${column.targetfieldname},\ |
|
||||||
</#if>\ |
|
||||||
</#foreach>\ |
|
||||||
null::char(1) as dummycol\ |
|
||||||
into temp tmp_stud2\ |
|
||||||
from tmp_stud\ |
|
||||||
where 1=1\ |
|
||||||
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> \ |
|
||||||
</#foreach>\ |
|
||||||
from tmp_stud2\ |
|
||||||
order by \ |
|
||||||
<#if rpta_column_layout.sortclause?has_content>\ |
|
||||||
${rpta_column_layout.sortclause}\ |
|
||||||
<#else>\ |
|
||||||
<#list 1..number_of_visible_colums as i>${i}\ |
|
||||||
<#if i != number_of_visible_colums>\ |
|
||||||
,\ |
|
||||||
</#if>\ |
|
||||||
</#list>\ |
|
||||||
</#if>\ |
|
||||||
;\ |
|
||||||
\ |
|
||||||
<#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;\ |
|
||||||
\ |
|
||||||
</#macro>^Makros zum Umgang mit Spaltenlayouts^^1^ |
|
@ -1,15 +0,0 @@ |
|||||||
|
|
||||||
delete from fm_templates where id in (select id from tmp_templates); |
|
||||||
|
|
||||||
insert into fm_templates(id, |
|
||||||
content, |
|
||||||
description, |
|
||||||
comment, |
|
||||||
version) select id, |
|
||||||
content, |
|
||||||
description, |
|
||||||
comment, |
|
||||||
version from tmp_templates; |
|
||||||
|
|
||||||
drop table tmp_templates; |
|
||||||
|
|
@ -1,11 +0,0 @@ |
|||||||
#!/bin/bash |
|
||||||
#löscht alle nicht-kern-templates und entlädt die Tabelle sortiert ins Rohdaten Verzeichnis (für git-diff). |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SX_CLIENT=jdbc |
|
||||||
export SX_CLIENT |
|
||||||
#man_catalogue |
|
||||||
DOQUERY "select * from fm_templates where id in ('RPTA-Makros')" false $DBDELIMITER ./fm_templates.unl txt |
|
||||||
|
|
@ -1,17 +0,0 @@ |
|||||||
#!/bin/bash |
|
||||||
|
|
||||||
DOQUERY "create table tmp_templates(tid integer, |
|
||||||
id char(200) not null, |
|
||||||
content text not null, |
|
||||||
description char(200) , |
|
||||||
comment char(200) , |
|
||||||
version integer default 1 |
|
||||||
|
|
||||||
) |
|
||||||
;" |
|
||||||
|
|
||||||
sx_auto_upload_table.x tmp_templates ./fm_templates.unl |
|
||||||
|
|
||||||
DOSQL fm_templates_fuellen.sql |
|
||||||
|
|
||||||
|
|
@ -1,150 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
|
|
||||||
-- für das RPTA-Makro wird schleifenrelation type text benötigt |
|
||||||
-- Umstellung auf schleifenrelation type text erfolgt in Kern 5.3 |
|
||||||
-- nach kern 5.3-Installation kann folgender alter table entfernt werden |
|
||||||
alter table macro_masken_bez alter column schleifenrelation type text; |
|
||||||
|
|
||||||
<#assign makros = [ |
|
||||||
{"tid":"48140"} |
|
||||||
] /> |
|
||||||
<#assign masken = [ |
|
||||||
{"makro":"48140", "tid":"48110", "sortnr":"10", |
|
||||||
"schleifenrelation":"<<SQL>> |
|
||||||
SELECT DISTINCT |
|
||||||
((((''_''::text || COALESCE(c.lid, btrim(l.fb::text)::character varying)::text) || ''_''::text) || btrim(l.stg::text)) || ''_''::text) || btrim(l.abschluss::text) AS apnr, |
|
||||||
(btrim(k.dtxt::text) || '' ''::text) || ((( SELECT a.druck FROM cifx a WHERE a.key = 35 AND a.apnr = l.abschluss))::text) AS druck |
|
||||||
FROM |
|
||||||
k_stg k, |
|
||||||
lehr_stg_ab l |
|
||||||
LEFT JOIN cifx c ON c.key = 90 AND (c.sourcesystem = ANY (ARRAY[5, 6, 10, 12, 15])) AND c.apnr = l.fb |
|
||||||
WHERE k.stg = l.stg |
|
||||||
and c.apnr=<<Fachbereich>> |
|
||||||
and l.abschluss in (''BA'',''MA'')", |
|
||||||
"schleifenfeldname":"Studiengang","schleifenfstand":"12.03.2025", "schleifenfsicht":"<<Studiengang-Sicht>>"} |
|
||||||
] /> |
|
||||||
<#assign felder = [ |
|
||||||
] /> |
|
||||||
|
|
||||||
-- ab hier nicht mehr ändern: |
|
||||||
CREATE TEMP TABLE tmp_macro_masken_bez ( |
|
||||||
maskeninfo_id1 integer NOT NULL, |
|
||||||
maskeninfo_id2 integer NOT NULL, |
|
||||||
active integer DEFAULT 1 NOT NULL, |
|
||||||
sortnr smallint NOT NULL, |
|
||||||
schleifenrelation text, |
|
||||||
schleifenfeldname character(255), |
|
||||||
alias character(255), |
|
||||||
schleifenfstand character(255), |
|
||||||
schleifenfsicht character(255), |
|
||||||
aktion character(255) |
|
||||||
); |
|
||||||
CREATE TEMP TABLE tmp_macro_feld_wert ( |
|
||||||
macro integer NOT NULL, |
|
||||||
sortnr integer NOT NULL, |
|
||||||
feldname character(255) NOT NULL, |
|
||||||
alias character(255) NOT NULL, |
|
||||||
value character(255), |
|
||||||
value_caption character(255), |
|
||||||
feldstand character(255), |
|
||||||
feldsicht character(255), |
|
||||||
active integer DEFAULT 1 NOT NULL |
|
||||||
); |
|
||||||
<#foreach makro in makros> |
|
||||||
<#foreach maske in masken> |
|
||||||
<#if maske.makro==makro.tid> |
|
||||||
insert into tmp_macro_masken_bez(maskeninfo_id1, |
|
||||||
maskeninfo_id2, |
|
||||||
active, |
|
||||||
sortnr, |
|
||||||
schleifenrelation, |
|
||||||
schleifenfeldname, |
|
||||||
schleifenfstand, |
|
||||||
schleifenfsicht) |
|
||||||
select ${makro.tid},--maskeninfo_id1, |
|
||||||
${maske.tid},--maskeninfo_id2, |
|
||||||
1,--active, |
|
||||||
${maske.sortnr}, --sortnr, |
|
||||||
'${maske.schleifenrelation}', --schleifenrelation, |
|
||||||
'${maske.schleifenfeldname}', --schleifenfeldname, |
|
||||||
'${maske.schleifenfstand}', --schleifenfstand, |
|
||||||
'${maske.schleifenfsicht}' --schleifenfsicht |
|
||||||
from xdummy; |
|
||||||
|
|
||||||
<#foreach feld in felder> |
|
||||||
<#if feld.makro==makro.tid && feld.sortnr==maske.sortnr> |
|
||||||
--Tab.12: alle ohne Exmatr |
|
||||||
insert into tmp_macro_feld_wert |
|
||||||
( macro, |
|
||||||
sortnr, |
|
||||||
feldname, |
|
||||||
alias, |
|
||||||
value, |
|
||||||
value_caption, |
|
||||||
feldstand, |
|
||||||
feldsicht, |
|
||||||
active) |
|
||||||
SELECT ${makro.tid}, --macro |
|
||||||
${maske.sortnr},--sortnr |
|
||||||
'${feld.feldname}',--feldname, |
|
||||||
'',--alias, |
|
||||||
'${feld.value}', --value, |
|
||||||
'',--value_caption, |
|
||||||
'', --feldstand, |
|
||||||
'',--feldsicht, |
|
||||||
1 --active |
|
||||||
FROM xdummy; |
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
</#if> |
|
||||||
</#foreach> |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
delete from macro_masken_bez where maskeninfo_id1 in (select maskeninfo_id1 from tmp_macro_masken_bez) |
|
||||||
; |
|
||||||
insert into macro_masken_bez |
|
||||||
(maskeninfo_id1, |
|
||||||
maskeninfo_id2, |
|
||||||
active, |
|
||||||
sortnr, |
|
||||||
schleifenrelation, |
|
||||||
schleifenfeldname, |
|
||||||
alias, |
|
||||||
schleifenfstand, |
|
||||||
schleifenfsicht, |
|
||||||
aktion) |
|
||||||
select maskeninfo_id1, |
|
||||||
maskeninfo_id2, |
|
||||||
active, |
|
||||||
sortnr, |
|
||||||
schleifenrelation, |
|
||||||
schleifenfeldname, |
|
||||||
alias, |
|
||||||
schleifenfstand, |
|
||||||
schleifenfsicht, |
|
||||||
aktion |
|
||||||
FROM tmp_macro_masken_bez |
|
||||||
; |
|
||||||
delete from macro_feld_wert where macro in (select macro from tmp_macro_feld_wert); |
|
||||||
insert into macro_feld_wert |
|
||||||
( macro, |
|
||||||
sortnr, |
|
||||||
feldname, |
|
||||||
alias, |
|
||||||
value, |
|
||||||
value_caption, |
|
||||||
feldstand, |
|
||||||
feldsicht, |
|
||||||
active) |
|
||||||
SELECT macro, |
|
||||||
sortnr, |
|
||||||
feldname, |
|
||||||
alias, |
|
||||||
value, |
|
||||||
value_caption, |
|
||||||
feldstand, |
|
||||||
feldsicht, |
|
||||||
active |
|
||||||
FROM tmp_macro_feld_wert; |
|
||||||
drop table tmp_macro_masken_bez; |
|
||||||
drop table tmp_macro_feld_wert; |
|
@ -1,411 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="man_kennz_aggr_exists"> |
|
||||||
select sp_table_exists('man_kennz_aggr') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='man_kennz_aggr' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"> |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'man_studiengang.tid_ref=man_kennz_aggr.studiengang' as joinclause |
|
||||||
from sx_tables where name in ('man_studiengang') |
|
||||||
union |
|
||||||
select 10::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'man_organigramm.key_apnr=man_kennz_aggr.ch110_institut' as joinclause |
|
||||||
from sx_tables where name in ('man_organigramm') |
|
||||||
order by 1 |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'${added_table.prefix}' || name as targetname |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if man_kennz_aggr_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"rpta_man_kennz_aggr", "caption":"Management Kennzahlen"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
--Vorbereitung: |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Institution' |
|
||||||
WHERE name='man_organigramm'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Studienart' |
|
||||||
-- WHERE name = 'sos_k_stuart'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Studiumstyp' |
|
||||||
-- WHERE name = 'sos_k_stutyp'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Studienform' |
|
||||||
-- WHERE name = 'sos_k_stufrm'; |
|
||||||
-- UPDATE sx_tables |
|
||||||
-- SET caption = 'Hörerstatus' |
|
||||||
-- WHERE name = 'sos_k_hrst'; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--drop view if exists sos_stud_astat; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='man_kennz_aggr' |
|
||||||
and name not in ('value','value1','value2'); |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='man_kennz_aggr' |
|
||||||
and name in ('value','value1','value2'); |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
200 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn man_kennz_aggr_exists=1 |
|
@ -1,431 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_lab_pord_exists"> |
|
||||||
select sp_table_exists('sos_lab_pord') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='sos_lab_pord' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"><![CDATA[ |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'dim_studiengang.tid=sos_lab_pord.tid_stg and sos_lab_pord.sem_der_pruefung >= semester_von and sos_lab_pord.sem_der_pruefung <= semester_bis' as joinclause |
|
||||||
from sx_tables where name in ('dim_studiengang') |
|
||||||
union select 10::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sos_lab_pord.labnr=sos_lab.labnr and sos_lab_pord.sourcesystem=sos_lab.sourcesystem' as joinclause |
|
||||||
from sx_tables where name in ('sos_lab') |
|
||||||
union select 20::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'cif.apnr=sos_lab_pord.pversion and sos_lab_pord.sourcesystem=5 and cif.key=632' as joinclause |
|
||||||
from sx_tables where name in ('cif') |
|
||||||
|
|
||||||
]]></sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists > |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
--and currentlyused=1 |
|
||||||
and name in ('matrikel_nr', |
|
||||||
'sem_der_pruefung', |
|
||||||
'hrst', |
|
||||||
'fach_sem_zahl', |
|
||||||
'kz_rueck_beur_ein', |
|
||||||
'part', |
|
||||||
'pnr', |
|
||||||
'pversuch', |
|
||||||
'prueck', |
|
||||||
'pversion', |
|
||||||
'pstatus', |
|
||||||
'd_abg_pruefung', |
|
||||||
'note', |
|
||||||
'pvermerk', |
|
||||||
'pform', |
|
||||||
'studiengang_nr', |
|
||||||
'fach_nr', |
|
||||||
'is_modul', |
|
||||||
'tid_stg', |
|
||||||
'pdtxt', |
|
||||||
'pktxt', |
|
||||||
'sourcesystem', |
|
||||||
'labnr' |
|
||||||
) |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'dim_studiengang_' || name as targetname |
|
||||||
from sx_fields where table_name ='dim_studiengang' |
|
||||||
and currentlyused=1 |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sos_lab_' || name as targetname |
|
||||||
from sx_fields where table_name ='sos_lab' |
|
||||||
and name in ('ppruef1','ppruef2','panerk') |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'pversion_ktxt' as targetname |
|
||||||
from sx_fields where table_name ='cif' |
|
||||||
and name in ('lang_3') |
|
||||||
|
|
||||||
|
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if sos_lab_pord_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"sos_lab_pord_ppruef", "caption":"Modulprüfungen und Prüfer_innen"} |
|
||||||
/> |
|
||||||
|
|
||||||
drop index if exists ix_sos_lab_pord_is_modul; |
|
||||||
|
|
||||||
create index ix_sos_lab_pord_is_modul on sos_lab_pord (is_modul ); |
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='sos_lab_pord' |
|
||||||
and name!='summe'; |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='sos_lab_pord' |
|
||||||
and name='summe'; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
7 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn sos_lab_pord_exists=1 |
|
@ -1,195 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_exam_unit_dim_studiengang_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='rpta_exam_unit_dim_studiengang'; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="rpta_resultset"> |
|
||||||
select uniquename from rpta_resultset where uniquename='rpta_exam_unit_dim_studiengang'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"rpta_exam_unit_dim_studiengang_note", |
|
||||||
"caption":"Prüfungsergebnisse", |
|
||||||
"rpta_resultset":"rpta_exam_unit_dim_studiengang", |
|
||||||
"whereclause":"((modulart=''P'' and sourcesystem=6) or (part=''MP'' and sourcesystem=5)) |
|
||||||
and pstatus in (''BE'',''NB'',''EN'') |
|
||||||
and (((panerk != ''J'' and sourcesystem=6) or (panerk is null and sourcesystem=6)) |
|
||||||
or ((panerk != ''I'' and panerk != ''J'' and panerk != ''H'' and sourcesystem=5) or (panerk is null and sourcesystem=5)))", |
|
||||||
"sortclause":"dim_studiengang_stg,dim_studiengang_abschluss,sem_der_pruefung,pdtxt", |
|
||||||
"description":"Prüfung und Noten" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
|
|
||||||
{"uniquename":"dim_studiengang_stg", |
|
||||||
"srcfieldname":"dim_studiengang_stg", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Fach", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"dim_studiengang_abschluss", |
|
||||||
"srcfieldname":"dim_studiengang_abschluss", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Abschluss", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"sem_der_pruefung", |
|
||||||
"srcfieldname":"sem_der_pruefung", |
|
||||||
"targetfieldname":"sem_der_pruefung", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Semester der Prüfung (Schlüssel)", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"sem_der_pruefung_str", |
|
||||||
"srcfieldname":"sem_der_pruefung", |
|
||||||
"targetfieldname":"sem_der_pruefung_str", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select eintrag from semester where tid=sem_der_pruefung", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Semester der Prüfung", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"elementnr", |
|
||||||
"srcfieldname":"elementnr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"pnr", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pdtxt", |
|
||||||
"srcfieldname":"pdtxt", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Name der Prüfung", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":40, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"summe", |
|
||||||
"srcfieldname":"summe", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Teilnehmer", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":15, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"note_case", |
|
||||||
"srcfieldname":"note", |
|
||||||
"targetfieldname":"note_case", |
|
||||||
"column_type":"preparingColumn", |
|
||||||
"col_function":"(case when note > 6 then null else note end)", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchschnittsnote * Vorbereitend", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"note_schnitt", |
|
||||||
"srcfieldname":"note_case", |
|
||||||
"targetfieldname":"note_schnitt", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"avg(note_case)", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchschnittsnote * Weiterverarbeitend", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"note_schnitt_case", |
|
||||||
"srcfieldname":"note_schnitt", |
|
||||||
"targetfieldname":"note_schnitt_case", |
|
||||||
"column_type":"computedColumn", |
|
||||||
"col_function":"case when summe < 5 then null else note_schnitt end", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchschnittsnote *", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":25, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pstatus_nb_sum", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"pstatus_nb_sum", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(case when pstatus in (''NB'',''EN'') then 1 else 0 end)", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchfallquote in % * Logisch", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pstatus_nb_quote", |
|
||||||
"srcfieldname":"pstatus_nb_sum", |
|
||||||
"targetfieldname":"pstatus_nb_quote", |
|
||||||
"column_type":"computedColumn", |
|
||||||
"col_function":"case when summe < 5 then null else pstatus_nb_sum/summe::decimal(18,2)*100 end", |
|
||||||
"format_code":"DEC_2", |
|
||||||
"caption":"Durchfallquote in % *", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":25, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pvermerk_ne_sum", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"pvermerk_ne_sum", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(case when pvermerk in (''NE'',''N'') then 1 else 0 end)", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Nicht erschienen", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"rpta_exam_unit_shortcomment", |
|
||||||
"srcfieldname":"shortcomment", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Kurzkommentar", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""} |
|
||||||
|
|
||||||
|
|
||||||
] /> |
|
||||||
|
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,443 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_exam_unit_dim_studiengang_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='rpta_exam_unit_dim_studiengang'; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="rpta_resultset"> |
|
||||||
select uniquename from rpta_resultset where uniquename='rpta_exam_unit_dim_studiengang'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layouts = [{"uniquename":"rpta_exam_unit_dim_studiengang_note", |
|
||||||
"caption":"Prüfungsergebnisse", |
|
||||||
"rpta_resultset":"rpta_exam_unit_dim_studiengang", |
|
||||||
"whereclause":"((modulart=''P'' and sourcesystem=6) or (part=''MP'' and sourcesystem=5))", |
|
||||||
"description":"Prüfung und Noten" |
|
||||||
}] |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
|
|
||||||
{"uniquename":"dim_studiengang_stg", |
|
||||||
"srcfieldname":"dim_studiengang_stg", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Fach", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"dim_studiengang_abschluss", |
|
||||||
"srcfieldname":"dim_studiengang_abschluss", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Abschluss", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"sem_der_pruefung", |
|
||||||
"srcfieldname":"sem_der_pruefung", |
|
||||||
"targetfieldname":"sem_der_pruefung", |
|
||||||
"column_type":"preparingColumn", |
|
||||||
"col_function":"sem_der_pruefung", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Semester der Prüfung", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"sem_der_pruefung_min_process", |
|
||||||
"srcfieldname":"sem_der_pruefung", |
|
||||||
"targetfieldname":"sem_der_pruefung_min_process", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"min", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Semester der Prüfung (Min)", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"sem_der_pruefung_max_process", |
|
||||||
"srcfieldname":"sem_der_pruefung", |
|
||||||
"targetfieldname":"sem_der_pruefung_max_process", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"max", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Semester der Prüfung (Max)", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"elementnr", |
|
||||||
"srcfieldname":"elementnr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"pnr", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pdtxt", |
|
||||||
"srcfieldname":"pdtxt", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Name der Prüfung", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":40, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"summe", |
|
||||||
"srcfieldname":"summe", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Teilnehmer", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":15, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"note_case", |
|
||||||
"srcfieldname":"note", |
|
||||||
"targetfieldname":"note_case", |
|
||||||
"column_type":"preparingColumn", |
|
||||||
"col_function":"(case when note > 6 then null else note end)", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchschnittsnote % *", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"note_schnitt", |
|
||||||
"srcfieldname":"note_case", |
|
||||||
"targetfieldname":"note_schnitt", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"avg", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchschnittsnote *", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"note_schnitt_case", |
|
||||||
"srcfieldname":"note_schnitt", |
|
||||||
"targetfieldname":"note_schnitt_case", |
|
||||||
"column_type":"computedColumn", |
|
||||||
"col_function":"case when summe < 5 then null else note_schnitt end", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchschnittsnote *", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":25, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pstatus_nb", |
|
||||||
"srcfieldname":"pstatus", |
|
||||||
"targetfieldname":"pstatus_nb", |
|
||||||
"column_type":"preparingColumn", |
|
||||||
"col_function":"(case when pstatus in (''NB'',''EN'') then 1 else 0 end)", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchfallquote in % *", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pstatus_nb_sum", |
|
||||||
"srcfieldname":"pstatus_nb", |
|
||||||
"targetfieldname":"pstatus_nb_sum", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Durchfallquote in % *", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pstatus_nb_quote", |
|
||||||
"srcfieldname":"pstatus_nb_sum", |
|
||||||
"targetfieldname":"pstatus_nb_quote", |
|
||||||
"column_type":"computedColumn", |
|
||||||
"col_function":"case when summe < 5 then null else pstatus_nb_sum/summe::decimal(18,2)*100 end", |
|
||||||
"format_code":"DEC_2", |
|
||||||
"caption":"Durchfallquote in % *", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":25, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pvermerk_ne", |
|
||||||
"srcfieldname":"pvermerk", |
|
||||||
"targetfieldname":"pvermerk_ne", |
|
||||||
"column_type":"preparingColumn", |
|
||||||
"col_function":"(case when pvermerk in (''NE'',''N'') then 1 else 0 end)", |
|
||||||
"format_code":"", |
|
||||||
"caption":"Nicht erschienen", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"description":""}, |
|
||||||
|
|
||||||
{"uniquename":"pvermerk_ne_sum", |
|
||||||
"srcfieldname":"pvermerk_ne", |
|
||||||
"targetfieldname":"pvermerk_ne_sum", |
|
||||||
"column_type":"processingColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"format_code":"INTEGER", |
|
||||||
"caption":"Nicht erschienen", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":1, |
|
||||||
"visible_size":25, |
|
||||||
"description":""} |
|
||||||
|
|
||||||
|
|
||||||
] /> |
|
||||||
|
|
||||||
|
|
||||||
---ab hier nicht mehr ändern: |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_column |
|
||||||
( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
targetfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_visible smallint, |
|
||||||
visible_size smallint, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
sortnr integer, |
|
||||||
description TEXT, |
|
||||||
format_code_uniquename varchar(255), |
|
||||||
format_code_id integer |
|
||||||
); |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_column_layout |
|
||||||
( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
resultset_id integer, |
|
||||||
whereclause text, |
|
||||||
description text |
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
|
|
||||||
insert into tmp_rpta_column_layout( |
|
||||||
resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
whereclause, |
|
||||||
description |
|
||||||
) |
|
||||||
select tid, |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
'${rpta_column_layout.caption}', |
|
||||||
'${rpta_column_layout.whereclause}', |
|
||||||
'${rpta_column_layout.description}' |
|
||||||
FROM rpta_resultset |
|
||||||
where uniquename='${rpta_column_layout.rpta_resultset}'; |
|
||||||
|
|
||||||
</#foreach > |
|
||||||
|
|
||||||
<#assign sortnr=0 /> |
|
||||||
<#foreach column in rpta_columns> |
|
||||||
<#assign sortnr=sortnr +1 /> |
|
||||||
|
|
||||||
INSERT INTO tmp_rpta_column |
|
||||||
(resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_visible, |
|
||||||
visible_size, |
|
||||||
is_aggregate, |
|
||||||
sortnr, |
|
||||||
description, |
|
||||||
format_code_uniquename |
|
||||||
) |
|
||||||
select R.tid, |
|
||||||
'${column.uniquename}', |
|
||||||
'${column.caption}', |
|
||||||
'${column.srcfieldname}', |
|
||||||
<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>, |
|
||||||
T.tid as column_type, |
|
||||||
<#if column.col_function?exists>'${column.col_function}'<#else>null::varchar </#if>, |
|
||||||
${column.is_visible}, |
|
||||||
${column.visible_size}, |
|
||||||
${column.is_aggregate}, |
|
||||||
${sortnr*10}, |
|
||||||
<#if column.description?exists>'${column.description}'<#else>null::varchar </#if>, |
|
||||||
<#if column.format_code?exists>'${column.format_code}'<#else>null::varchar </#if> |
|
||||||
FROM rpta_resultset R, rpta_column_type T |
|
||||||
where R.uniquename='${rpta_resultset}' |
|
||||||
and T.uniquename='${column.column_type}'; |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
|
|
||||||
update tmp_rpta_column set format_code_id=C.tid |
|
||||||
from rpta_format_code C |
|
||||||
where C.uniquename=tmp_rpta_column.format_code_uniquename |
|
||||||
and format_code_uniquename is not null; |
|
||||||
|
|
||||||
|
|
||||||
select * into temp tmp_rpta_column2layout |
|
||||||
from rpta_column2layout |
|
||||||
where layout_id in (select L.tid |
|
||||||
from rpta_column_layout L,rpta_resultset R |
|
||||||
where R.tid=L.resultset_id |
|
||||||
and R.uniquename='${rpta_resultset}' |
|
||||||
and L.uniquename in ( |
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
</#foreach>'xy') |
|
||||||
) |
|
||||||
; |
|
||||||
|
|
||||||
select * into temp tmp_rpta_column_layout_target |
|
||||||
from rpta_column_layout |
|
||||||
where resultset_id in (select tid |
|
||||||
FROM rpta_resultset |
|
||||||
where uniquename='${rpta_resultset}') |
|
||||||
and uniquename in (select uniquename from tmp_rpta_column_layout) |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_column_layout |
|
||||||
(uniquename, |
|
||||||
caption, |
|
||||||
resultset_id, |
|
||||||
whereclause, |
|
||||||
description) |
|
||||||
select uniquename, |
|
||||||
caption, |
|
||||||
resultset_id, |
|
||||||
whereclause, |
|
||||||
description |
|
||||||
FROM tmp_rpta_column_layout T |
|
||||||
where 0=(select count(*) from tmp_rpta_column_layout_target T2 |
|
||||||
where T.uniquename=T2.uniquename); |
|
||||||
|
|
||||||
drop table tmp_rpta_column_layout_target; |
|
||||||
|
|
||||||
delete from rpta_column2layout |
|
||||||
where layout_id in (select L.tid |
|
||||||
from rpta_column_layout L,rpta_resultset R |
|
||||||
where R.tid=L.resultset_id |
|
||||||
and R.uniquename='${rpta_resultset}' |
|
||||||
and L.uniquename in ( |
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
</#foreach>'xy') |
|
||||||
) |
|
||||||
; |
|
||||||
|
|
||||||
select * into temp tmp_rpta_column2 |
|
||||||
from tmp_rpta_column T |
|
||||||
where (resultset_id,uniquename) not in |
|
||||||
(select resultset_id,uniquename from rpta_column); |
|
||||||
|
|
||||||
INSERT INTO rpta_column |
|
||||||
(resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description, |
|
||||||
custom |
|
||||||
) |
|
||||||
select |
|
||||||
resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description, |
|
||||||
0 as custom |
|
||||||
from tmp_rpta_column2; |
|
||||||
|
|
||||||
--evtl. neuen Satz einfügen, dann alle updaten |
|
||||||
|
|
||||||
update rpta_column set ( caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description) |
|
||||||
= (select caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description |
|
||||||
from tmp_rpta_column T |
|
||||||
where T.resultset_id=rpta_column.resultset_id |
|
||||||
and T.uniquename=rpta_column.uniquename) |
|
||||||
where custom=0 |
|
||||||
and (resultset_id,uniquename) in |
|
||||||
(select T.resultset_id,T.uniquename |
|
||||||
from tmp_rpta_column T) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column2; |
|
||||||
|
|
||||||
insert into rpta_column2layout(column_id, |
|
||||||
layout_id, |
|
||||||
sortnr, |
|
||||||
is_visible, |
|
||||||
visible_size, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
format_code_id) |
|
||||||
select C.tid as column_id, |
|
||||||
L.tid as layout_id, |
|
||||||
T.sortnr, |
|
||||||
T.is_visible, |
|
||||||
T.visible_size, |
|
||||||
T.caption, |
|
||||||
T.description, |
|
||||||
T.format_code_id |
|
||||||
FROM rpta_column C, rpta_column_layout L, tmp_rpta_column T |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=T.resultset_id |
|
||||||
and L.uniquename in ( |
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
</#foreach>'xy') |
|
||||||
and L.resultset_id=T.resultset_id |
|
||||||
; |
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table if exists tmp_rpta_column2; |
|
||||||
drop TABLE tmp_rpta_column_layout; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,79 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"sos_stud_astat_rsz", |
|
||||||
"caption":"MKW-Abfrage_Studierende_RSZ", |
|
||||||
"rpta_resultset":"sos_stud_astat", |
|
||||||
"whereclause":"fach_sem_zahl <= dim_studiengang_regel", |
|
||||||
"description":"MKW-Abfrage_Studierende_RSZ" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"sos_k_stort_astat", |
|
||||||
"caption":"Hochschulnummer Statistik", |
|
||||||
"srcfieldname":"sos_k_stort_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_stg_astat", |
|
||||||
"caption":"HSF-Schlüssel", |
|
||||||
"srcfieldname":"dim_studiengang_stg_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0" |
|
||||||
}, |
|
||||||
{"uniquename":"sos_k_stufrm_astat", |
|
||||||
"caption":"Art des Studiums", |
|
||||||
"srcfieldname":"sos_k_stufrm_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_abschluss_astat", |
|
||||||
"caption":"Abschlussschlüssel Statistik NRW", |
|
||||||
"srcfieldname":"dim_studiengang_abschluss_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0" |
|
||||||
}, |
|
||||||
{"uniquename":"sos_k_stutyp_astat", |
|
||||||
"caption":"Vollzeit / Teilzeit / ausbildungsintegriert / praxisintegriert / berufsintegriert", |
|
||||||
"srcfieldname":"sos_k_stutyp_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_regel", |
|
||||||
"caption":"Angabe der Regelstudienzeit", |
|
||||||
"srcfieldname":"dim_studiengang_regel", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0" |
|
||||||
}, |
|
||||||
{"uniquename":"summe", |
|
||||||
"caption":"Anzahl der Studierenden in der Regelstudienzeit", |
|
||||||
"srcfieldname":"summe", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1" |
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
@ -1,76 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_man_kennz_aggr_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='rpta_man_kennz_aggr'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"man_kennz_aggr_studiengang", |
|
||||||
"caption":"Management Kennz. nach FB und Studiengang", |
|
||||||
"rpta_resultset":"rpta_man_kennz_aggr", |
|
||||||
"whereclause":"", |
|
||||||
"description":"" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"sem", |
|
||||||
"caption":"Semester", |
|
||||||
"srcfieldname":"sem", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"man_organigramm_drucktext", |
|
||||||
"caption":"Institution", |
|
||||||
"srcfieldname":"man_organigramm_drucktext", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"abschluss_grp_str", |
|
||||||
"caption":"Abschlussgruppe", |
|
||||||
"srcfieldname":"abschluss_grp_str", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
|
|
||||||
{"uniquename":"man_studiengang_text", |
|
||||||
"caption":"Studiengang", |
|
||||||
"srcfieldname":"man_studiengang_text", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"summe", |
|
||||||
"caption_der_spalte":"Summe", |
|
||||||
"caption_in_ergebnistabelle":"Summe", |
|
||||||
"srcfieldname":"value", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description_der_spalte":"Summe", |
|
||||||
"description_in_ergebnistabelle":"" |
|
||||||
|
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
@ -1,182 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_installed"> |
|
||||||
select count(*) from systeminfo where tid=330; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"sgd_pbe_pbv", |
|
||||||
"caption":"Stellen, Besetzungen und Beschäftigungsverhältnisse", |
|
||||||
"rpta_resultset":"sva_pbe_aggr_sgd", |
|
||||||
"whereclause":"", |
|
||||||
"description":"Stellendaten, Besetzungen und Personaldaten" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"ch110_besch_st", |
|
||||||
"caption":"Beschäftigungsstelle (Schlüssel)", |
|
||||||
"srcfieldname":"ch110_besch_st", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Beschäftigungsstelle (Schlüssel)" |
|
||||||
}, |
|
||||||
{"uniquename":"ch110_besch_st_str", |
|
||||||
"caption":"Beschäftigungsstelle", |
|
||||||
"srcfieldname":"ch110_besch_st_str", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select C.druck from cifx C where C.key=110 and C.apnr=ch110_besch_st", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Beschäftigungsstelle (Name)" |
|
||||||
}, |
|
||||||
{"uniquename":"stellen_nr", |
|
||||||
"caption":"Stellen-Nr.", |
|
||||||
"srcfieldname":"stellen_nr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Stellen-Nr." |
|
||||||
}, |
|
||||||
{"uniquename":"haushalt_nr", |
|
||||||
"caption":"Stellen-Nr. im HH-Plan", |
|
||||||
"srcfieldname":"haushalt_nr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Stellen-Nr. im HH-Plan" |
|
||||||
}, |
|
||||||
{"uniquename":"widmung", |
|
||||||
"caption":"Widmung", |
|
||||||
"srcfieldname":"sva_sgd_widmung", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Widmung" |
|
||||||
}, |
|
||||||
{"uniquename":"sva_sgd_von", |
|
||||||
"caption":"Stellengültigkeit (von)", |
|
||||||
"srcfieldname":"d_finanz_anfang", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Stellengültigkeit (von)" |
|
||||||
}, |
|
||||||
{"uniquename":"sva_sgd_bis", |
|
||||||
"caption":"Stellengültigkeit (bis)", |
|
||||||
"srcfieldname":"d_finanz_ende", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Stellengültigkeit (bis)" |
|
||||||
}, |
|
||||||
{"uniquename":"sgd_ansatz", |
|
||||||
"caption":"Stellen-Ansatz", |
|
||||||
"srcfieldname":"kont_proz_soll", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Stellen-Ansatz" |
|
||||||
}, |
|
||||||
{"uniquename":"personal_nr", |
|
||||||
"caption":"Personal-Nr.", |
|
||||||
"srcfieldname":"sva_pbe_aggr_personal_nr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"besch_verh_nr", |
|
||||||
"caption":"Besch.-Verh Nr.", |
|
||||||
"srcfieldname":"sva_pbe_aggr_besch_verh_nr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"name", |
|
||||||
"caption":"Person Name", |
|
||||||
"srcfieldname":"sva_pbe_aggr_name", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"d_besetz_anfang", |
|
||||||
"caption":"Besetzung gültig (von)", |
|
||||||
"srcfieldname":"sva_pbe_aggr_d_besetz_anfang", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"0", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
} , |
|
||||||
{"uniquename":"d_besetz_ende", |
|
||||||
"caption":"Besetzung gültig (bis)", |
|
||||||
"srcfieldname":"sva_pbe_aggr_d_besetz_ende", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"0", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"pbe_von", |
|
||||||
"caption":"Besetzungsdatum (von)", |
|
||||||
"srcfieldname":"sva_pbe_aggr_pbe_von", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"0", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
} , |
|
||||||
{"uniquename":"pbe_bis", |
|
||||||
"caption":"Besetzungsdatum (bis)", |
|
||||||
"srcfieldname":"sva_pbe_aggr_pbe_bis", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"0", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"vzae", |
|
||||||
"caption":"VZÄ (Besetzung)", |
|
||||||
"srcfieldname":"sva_pbe_aggr_vzae", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"" |
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
<#if rpta_installed==1> |
|
||||||
<@rpta_column_layout_fuellen /> |
|
||||||
</#if> |
|
@ -1,554 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_lab_pord_ppruef_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='sos_lab_pord_ppruef'; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="rpta_resultset"> |
|
||||||
select uniquename from rpta_resultset where uniquename='sos_lab_pord_ppruef'; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="sos_dipl_pos_swf_exists"> |
|
||||||
select sp_table_exists('sos_dipl_pos_swf'); |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
|
|
||||||
<#if sos_dipl_pos_swf_exists==1> |
|
||||||
--aktuell nur für SWF |
|
||||||
|
|
||||||
<#assign rpta_column_layouts = [ {"uniquename":"sos_lab_pord_ppruef_modul", |
|
||||||
"caption":"Modulprüfungen und Prüfer_innen Einzeldaten", |
|
||||||
"rpta_resultset":"sos_lab_pord_ppruef", |
|
||||||
"whereclause":"is_modul=1", |
|
||||||
"description":"Modulprüfungen und Prüfer_innen" |
|
||||||
}, |
|
||||||
{"uniquename":"sos_lab_pord_ppruef_thesis", |
|
||||||
"caption":"Abschlussarbeiten und Betreuer_innen Einzeldaten", |
|
||||||
"rpta_resultset":"sos_lab_pord_ppruef", |
|
||||||
"whereclause":"labnr in (select labnr from sos_dipl_pos_swf)", |
|
||||||
"description":"Abschlussarbeiten und Betreuer_innen" |
|
||||||
}] |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
|
|
||||||
{"uniquename":"matrikel_nr", |
|
||||||
"srcfieldname":"matrikel_nr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"format_code":"INT_NO_SEP", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Matrikel-Nr.", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"sourcesystem", |
|
||||||
"srcfieldname":"sourcesystem", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"format_code":"", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Quellsystem", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"labnr", |
|
||||||
"srcfieldname":"labnr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"format_code":"", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"ID der Prüfung", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"sem_der_pruefung", |
|
||||||
"srcfieldname":"sem_der_pruefung", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"format_code":"INT_NO_SEP", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Semester", |
|
||||||
"is_visible":"0", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"sem_rueck_beur_ein_max", |
|
||||||
"srcfieldname":"sem_rueck_beur_ein_max", |
|
||||||
"targetfieldname":"sos_lab_sem_rueck_beur_ein_max", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"format_code":"INT_NO_SEP", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Letztes Semester", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"select sem_rueck_beur_ein from sos_sos S where S.matrikel_nr=tmp_sos_lab_pord_ppruef.matrikel_nr"} |
|
||||||
, |
|
||||||
{"uniquename":"status", |
|
||||||
"srcfieldname":"status", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Status", |
|
||||||
"is_visible":1, |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"select ST.apnr from sos_k_status ST where val(ST.astat)=kz_rueck_beur_ein"}, |
|
||||||
|
|
||||||
{"uniquename":"hrst", |
|
||||||
"srcfieldname":"hrst", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Hörerstatus", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"vorname", |
|
||||||
"srcfieldname":"vorname", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Vorname", |
|
||||||
"is_visible":1, |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"select A.firstname from sos_stud_address A where A.matrikel_nr=tmp_sos_lab_pord_ppruef.matrikel_nr"}, |
|
||||||
|
|
||||||
{"uniquename":"nachname", |
|
||||||
"srcfieldname":"nachname", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Nachname", |
|
||||||
"is_visible":1, |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"select A.surname from sos_stud_address A where A.matrikel_nr=tmp_sos_lab_pord_ppruef.matrikel_nr"}, |
|
||||||
|
|
||||||
{"uniquename":"res1", |
|
||||||
"srcfieldname":"res1", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Austauschstudierende/Doppelabsolventen", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"select min(attributevalue) from personattribute A where tmp_sos_lab_pord_ppruef.sem_der_pruefung between A.semester_von and A.semester_bis and A.personattributetype_id="+K_SOS_PERSATTR_AUSTAUSCH+" and A.matrikel_nr=tmp_sos_lab_pord_ppruef.matrikel_nr"}, |
|
||||||
|
|
||||||
{"uniquename":"stg", |
|
||||||
"srcfieldname":"dim_studiengang_stg", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Fach", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"abschluss", |
|
||||||
"srcfieldname":"dim_studiengang_abschluss", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Abschluss", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5} |
|
||||||
|
|
||||||
{"uniquename":"fach_sem_zahl", |
|
||||||
"srcfieldname":"fach_sem_zahl", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Fachsemester", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"stgnr", |
|
||||||
"srcfieldname":"stgnr", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Studiengangnr.", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"'''' || studiengang_nr || fach_nr"}, |
|
||||||
|
|
||||||
{"uniquename":"part", |
|
||||||
"srcfieldname":"part", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Prüfungsart", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"pnr_pos", |
|
||||||
"srcfieldname":"pnr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"format_code":"INT_NO_SEP", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Prüfungsnummer POS", |
|
||||||
"is_visible":0, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"elementnr", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"elementnr", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Prüfungsnummer", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"pktxt"}, |
|
||||||
|
|
||||||
|
|
||||||
{"uniquename":"pversuch", |
|
||||||
"srcfieldname":"pversuch", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Prüfungsversuch", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"prueck", |
|
||||||
"srcfieldname":"prueck", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Rücktritt", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"pversion_ktxt", |
|
||||||
"srcfieldname":"pversion_ktxt", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"PO-Version", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"pstatus", |
|
||||||
"srcfieldname":"pstatus", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Prüfungsstatus", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"d_abg_pruefung", |
|
||||||
"srcfieldname":"d_abg_pruefung", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Prüfungsdatum", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"note", |
|
||||||
"srcfieldname":"note", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Note", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"sos_lab_panerk", |
|
||||||
"srcfieldname":"sos_lab_panerk", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Anerkennung", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"pvermerk", |
|
||||||
"srcfieldname":"pvermerk", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Vermerk", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"pform", |
|
||||||
"srcfieldname":"pform", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Prüfungsform", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"pdtxt", |
|
||||||
"srcfieldname":"pdtxt", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"PO-Element Name", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"ppruef1", |
|
||||||
"srcfieldname":"sos_lab_ppruef1", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Erstprüfer_in Schlüssel", |
|
||||||
"is_visible":0, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"ppruef1_str", |
|
||||||
"srcfieldname":"ppruef1", |
|
||||||
"targetfieldname":"sos_lab_ppruef1_str", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Erstprüfer_in", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"select replace(C.druck,'','','''') from cifx C where C.key=9011 and C.apnr=tmp_sos_lab_pord_ppruef.sos_lab_ppruef1"}, |
|
||||||
|
|
||||||
{"uniquename":"ppruef2", |
|
||||||
"srcfieldname":"sos_lab_ppruef2", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Zweitprüfer_in", |
|
||||||
"is_visible":0, |
|
||||||
"visible_size":5}, |
|
||||||
|
|
||||||
{"uniquename":"ppruef2_str", |
|
||||||
"srcfieldname":"ppruef2", |
|
||||||
"targetfieldname":"sos_lab_ppruef2_str", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Zweitprüfer_in", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"select replace(C.druck,'','','''') from cifx C where C.key=9011 and C.apnr=tmp_sos_lab_pord_ppruef.sos_lab_ppruef2"} |
|
||||||
, |
|
||||||
{"uniquename":"sem_d_abg_pruefung", |
|
||||||
"srcfieldname":"sem_d_abg_pruefung", |
|
||||||
"targetfieldname":"sos_lab_sem_d_abg_pruefung", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"format_code":"INT_NO_SEP", |
|
||||||
"is_aggregate":0, |
|
||||||
"caption":"Semester der Prüfung", |
|
||||||
"is_visible":1, |
|
||||||
"visible_size":5, |
|
||||||
"col_function":"sem_der_pruefung"} |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
] /> |
|
||||||
|
|
||||||
---ab hier nicht mehr ändern: |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_column |
|
||||||
( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
targetfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_visible smallint, |
|
||||||
visible_size smallint, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
sortnr integer, |
|
||||||
description TEXT, |
|
||||||
format_code_uniquename varchar(255), |
|
||||||
format_code_id integer |
|
||||||
); |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_column_layout |
|
||||||
( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
resultset_id integer, |
|
||||||
whereclause text, |
|
||||||
description text |
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
|
|
||||||
insert into tmp_rpta_column_layout( |
|
||||||
resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
whereclause, |
|
||||||
description |
|
||||||
) |
|
||||||
select tid, |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
'${rpta_column_layout.caption}', |
|
||||||
'${rpta_column_layout.whereclause}', |
|
||||||
'${rpta_column_layout.description}' |
|
||||||
FROM rpta_resultset |
|
||||||
where uniquename='${rpta_column_layout.rpta_resultset}'; |
|
||||||
|
|
||||||
</#foreach > |
|
||||||
|
|
||||||
<#assign sortnr=0 /> |
|
||||||
<#foreach column in rpta_columns> |
|
||||||
<#assign sortnr=sortnr +1 /> |
|
||||||
|
|
||||||
INSERT INTO tmp_rpta_column |
|
||||||
(resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_visible, |
|
||||||
visible_size, |
|
||||||
is_aggregate, |
|
||||||
sortnr, |
|
||||||
description, |
|
||||||
format_code_uniquename |
|
||||||
) |
|
||||||
select R.tid, |
|
||||||
'${column.uniquename}', |
|
||||||
'${column.caption}', |
|
||||||
'${column.srcfieldname}', |
|
||||||
<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>, |
|
||||||
T.tid as column_type, |
|
||||||
<#if column.col_function?exists>'${column.col_function}'<#else>null::varchar </#if>, |
|
||||||
${column.is_visible}, |
|
||||||
${column.visible_size}, |
|
||||||
${column.is_aggregate}, |
|
||||||
${sortnr*10}, |
|
||||||
<#if column.description?exists>'${column.description}'<#else>null::varchar </#if>, |
|
||||||
<#if column.format_code?exists>'${column.format_code}'<#else>null::varchar </#if> |
|
||||||
FROM rpta_resultset R, rpta_column_type T |
|
||||||
where R.uniquename='${rpta_resultset}' |
|
||||||
and T.uniquename='${column.column_type}'; |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
|
|
||||||
update tmp_rpta_column set format_code_id=C.tid |
|
||||||
from rpta_format_code C |
|
||||||
where C.uniquename=tmp_rpta_column.format_code_uniquename |
|
||||||
and format_code_uniquename is not null; |
|
||||||
|
|
||||||
|
|
||||||
select * into temp tmp_rpta_column2layout |
|
||||||
from rpta_column2layout |
|
||||||
where layout_id in (select L.tid |
|
||||||
from rpta_column_layout L,rpta_resultset R |
|
||||||
where R.tid=L.resultset_id |
|
||||||
and R.uniquename='${rpta_resultset}' |
|
||||||
and L.uniquename in ( |
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
</#foreach>'xy') |
|
||||||
) |
|
||||||
; |
|
||||||
|
|
||||||
select * into temp tmp_rpta_column_layout_target |
|
||||||
from rpta_column_layout |
|
||||||
where resultset_id in (select tid |
|
||||||
FROM rpta_resultset |
|
||||||
where uniquename='${rpta_resultset}') |
|
||||||
and uniquename in (select uniquename from tmp_rpta_column_layout) |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_column_layout |
|
||||||
(uniquename, |
|
||||||
caption, |
|
||||||
resultset_id, |
|
||||||
whereclause, |
|
||||||
description) |
|
||||||
select uniquename, |
|
||||||
caption, |
|
||||||
resultset_id, |
|
||||||
whereclause, |
|
||||||
description |
|
||||||
FROM tmp_rpta_column_layout T |
|
||||||
where 0=(select count(*) from tmp_rpta_column_layout_target T2 |
|
||||||
where T.uniquename=T2.uniquename); |
|
||||||
|
|
||||||
drop table tmp_rpta_column_layout_target; |
|
||||||
|
|
||||||
delete from rpta_column2layout |
|
||||||
where layout_id in (select L.tid |
|
||||||
from rpta_column_layout L,rpta_resultset R |
|
||||||
where R.tid=L.resultset_id |
|
||||||
and R.uniquename='${rpta_resultset}' |
|
||||||
and L.uniquename in ( |
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
</#foreach>'xy') |
|
||||||
) |
|
||||||
; |
|
||||||
|
|
||||||
select * into temp tmp_rpta_column2 |
|
||||||
from tmp_rpta_column T |
|
||||||
where (resultset_id,uniquename) not in |
|
||||||
(select resultset_id,uniquename from rpta_column); |
|
||||||
|
|
||||||
INSERT INTO rpta_column |
|
||||||
(resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description, |
|
||||||
custom |
|
||||||
) |
|
||||||
select |
|
||||||
resultset_id, |
|
||||||
uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description, |
|
||||||
0 as custom |
|
||||||
from tmp_rpta_column2; |
|
||||||
|
|
||||||
--evtl. neuen Satz einfügen, dann alle updaten |
|
||||||
|
|
||||||
update rpta_column set ( caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description) |
|
||||||
= (select caption, |
|
||||||
srcfieldname, |
|
||||||
targetfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
description |
|
||||||
from tmp_rpta_column T |
|
||||||
where T.resultset_id=rpta_column.resultset_id |
|
||||||
and T.uniquename=rpta_column.uniquename) |
|
||||||
where custom=0 |
|
||||||
and (resultset_id,uniquename) in |
|
||||||
(select T.resultset_id,T.uniquename |
|
||||||
from tmp_rpta_column T) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column2; |
|
||||||
|
|
||||||
insert into rpta_column2layout(column_id, |
|
||||||
layout_id, |
|
||||||
sortnr, |
|
||||||
is_visible, |
|
||||||
visible_size, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
format_code_id) |
|
||||||
select C.tid as column_id, |
|
||||||
L.tid as layout_id, |
|
||||||
T.sortnr, |
|
||||||
T.is_visible, |
|
||||||
T.visible_size, |
|
||||||
T.caption, |
|
||||||
T.description, |
|
||||||
T.format_code_id |
|
||||||
FROM rpta_column C, rpta_column_layout L, tmp_rpta_column T |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=T.resultset_id |
|
||||||
and L.uniquename in ( |
|
||||||
<#foreach rpta_column_layout in rpta_column_layouts> |
|
||||||
'${rpta_column_layout.uniquename}', |
|
||||||
</#foreach>'xy') |
|
||||||
and L.resultset_id=T.resultset_id |
|
||||||
; |
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table if exists tmp_rpta_column2; |
|
||||||
drop TABLE tmp_rpta_column_layout; |
|
||||||
drop table tmp_rpta_column2layout; |
|
||||||
|
|
||||||
</#if> --wenn sos_dipl_pos_swf_exists=1 |
|
||||||
|
|
@ -1,96 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_stud_astat_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='sos_stud_astat'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"sos_stud_astat_rsz", |
|
||||||
"caption":"MKW-Abfrage_Studierende_RSZ", |
|
||||||
"rpta_resultset":"sos_stud_astat", |
|
||||||
"whereclause":"fach_sem_zahl <= dim_studiengang_regel and dim_studiengang_regel between 1 and 20 and studiengang_nr <=2 and fach_nr <=4", |
|
||||||
"description":"Fachbelegungen: 1. & 2. Studiengang; 1.-4. Fach; nur Studiengänge mit Angabe einer Regelstudienzeit" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"sos_k_stort_astat", |
|
||||||
"caption":"Hochschulnummer Statistik", |
|
||||||
"srcfieldname":"sos_k_stort_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Amtliche Standortnummer" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_stg_astat", |
|
||||||
"caption_der_spalte":"Fach amtlich (Land)", |
|
||||||
"caption_in_ergebnistabelle":"HSF-Schlüssel", |
|
||||||
"srcfieldname":"dim_studiengang_stg_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Amtliches Fach (Land)" |
|
||||||
}, |
|
||||||
{"uniquename":"sos_k_stufrm_astat", |
|
||||||
"caption":"Art des Studiums", |
|
||||||
"srcfieldname":"sos_k_stufrm_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Amtliche Studienform" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_abschluss_astat", |
|
||||||
"caption":"Abschlussschlüssel Statistik NRW", |
|
||||||
"srcfieldname":"dim_studiengang_abschluss_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Amtlicher Abschluss" |
|
||||||
}, |
|
||||||
{"uniquename":"sos_k_stutyp_astat", |
|
||||||
"caption":"Vollzeit / Teilzeit / ausbildungsintegriert / praxisintegriert / berufsintegriert", |
|
||||||
"srcfieldname":"sos_k_stutyp_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Amtlicher Studiumstyp" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_regel", |
|
||||||
"caption":"Angabe der Regelstudienzeit", |
|
||||||
"srcfieldname":"dim_studiengang_regel", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Regelstudienzeit in Semestern" |
|
||||||
}, |
|
||||||
{"uniquename":"summe", |
|
||||||
"caption_der_spalte":"Summe der Studierenden", |
|
||||||
"caption_in_ergebnistabelle":"Anzahl der Studierenden in der Regelstudienzeit", |
|
||||||
"srcfieldname":"summe", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description_der_spalte":"Summe der Studierenden", |
|
||||||
"description_in_ergebnistabelle":"Summe der Studierenden mit Fachsemester kleiner oder gleich der Regelstudienzeit" |
|
||||||
|
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
@ -0,0 +1,292 @@ |
|||||||
|
--freemarker template |
||||||
|
<sqlvars> |
||||||
|
<sqlvar name="sos_stud_astat_exists"> |
||||||
|
select count(*) from rpta_resultset where uniquename='sos_stud_astat'; |
||||||
|
</sqlvar> |
||||||
|
</sqlvars> |
||||||
|
<#assign rpta_column_layout = {"uniquename":"sos_stud_astat_rsz", |
||||||
|
"caption":"MKW-Abfrage_Studierende_RSZ", |
||||||
|
"rpta_resultset":"sos_stud_astat", |
||||||
|
"whereclause":"fach_sem_zahl <= dim_studiengang_regel and dim_studiengang_regel between 1 and 20 and studiengang_nr <=2 and fach_nr <=4", |
||||||
|
"description":"Fachbelegungen: 1. & 2. Studiengang; 1.-4. Fach; nur Studiengänge mit Angabe einer Regelstudienzeit" |
||||||
|
} |
||||||
|
/> |
||||||
|
|
||||||
|
<#assign rpta_columns = [ |
||||||
|
{"uniquename":"sos_k_stort_astat", |
||||||
|
"caption":"Hochschulnummer Statistik", |
||||||
|
"srcfieldname":"sos_k_stort_astat", |
||||||
|
"column_type":"physicalColumn", |
||||||
|
"col_function":"", |
||||||
|
"is_visible":"1", |
||||||
|
"visible_size":"10", |
||||||
|
"is_aggregate":"0", |
||||||
|
"description":"Amtliche Standortnummer" |
||||||
|
}, |
||||||
|
{"uniquename":"dim_studiengang_stg_astat", |
||||||
|
"caption":"HSF-Schlüssel", |
||||||
|
"srcfieldname":"dim_studiengang_stg_astat", |
||||||
|
"column_type":"physicalColumn", |
||||||
|
"col_function":"", |
||||||
|
"is_visible":"1", |
||||||
|
"visible_size":"10", |
||||||
|
"is_aggregate":"0", |
||||||
|
"description":"Amtliches Fach" |
||||||
|
}, |
||||||
|
{"uniquename":"sos_k_stufrm_astat", |
||||||
|
"caption":"Art des Studiums", |
||||||
|
"srcfieldname":"sos_k_stufrm_astat", |
||||||
|
"column_type":"physicalColumn", |
||||||
|
"col_function":"", |
||||||
|
"is_visible":"1", |
||||||
|
"visible_size":"10", |
||||||
|
"is_aggregate":"0", |
||||||
|
"description":"Amtliche Studienform" |
||||||
|
}, |
||||||
|
{"uniquename":"dim_studiengang_abschluss_astat", |
||||||
|
"caption":"Abschlussschlüssel Statistik NRW", |
||||||
|
"srcfieldname":"dim_studiengang_abschluss_astat", |
||||||
|
"column_type":"physicalColumn", |
||||||
|
"col_function":"", |
||||||
|
"is_visible":"1", |
||||||
|
"visible_size":"10", |
||||||
|
"is_aggregate":"0", |
||||||
|
"description":"Amtlicher Abschluss" |
||||||
|
}, |
||||||
|
{"uniquename":"sos_k_stutyp_astat", |
||||||
|
"caption":"Vollzeit / Teilzeit / ausbildungsintegriert / praxisintegriert / berufsintegriert", |
||||||
|
"srcfieldname":"sos_k_stutyp_astat", |
||||||
|
"column_type":"physicalColumn", |
||||||
|
"col_function":"", |
||||||
|
"is_visible":"1", |
||||||
|
"visible_size":"10", |
||||||
|
"is_aggregate":"0", |
||||||
|
"description":"Amtlicher Studiumstyp" |
||||||
|
}, |
||||||
|
{"uniquename":"dim_studiengang_regel", |
||||||
|
"caption":"Angabe der Regelstudienzeit", |
||||||
|
"srcfieldname":"dim_studiengang_regel", |
||||||
|
"column_type":"physicalColumn", |
||||||
|
"col_function":"", |
||||||
|
"is_visible":"1", |
||||||
|
"visible_size":"10", |
||||||
|
"is_aggregate":"0", |
||||||
|
"description":"Regelstudienzeit in Semestern" |
||||||
|
}, |
||||||
|
{"uniquename":"summe", |
||||||
|
"caption":"Anzahl der Studierenden in der Regelstudienzeit", |
||||||
|
"srcfieldname":"summe", |
||||||
|
"column_type":"physicalColumn", |
||||||
|
"col_function":"sum", |
||||||
|
"is_visible":"1", |
||||||
|
"visible_size":"5", |
||||||
|
"is_aggregate":"1", |
||||||
|
"description":"Summe der Studierenden mit Fachsemester kleiner oder gleich der Regelstudienzeit" |
||||||
|
} |
||||||
|
] |
||||||
|
/> |
||||||
|
|
||||||
|
---ab hier nicht mehr ändern: |
||||||
|
|
||||||
|
CREATE temp TABLE tmp_rpta_column |
||||||
|
( |
||||||
|
uniquename varchar(255) NOT NULL, |
||||||
|
caption varchar(255), |
||||||
|
srcfieldname varchar(255), |
||||||
|
targetfieldname varchar(255), |
||||||
|
column_type integer, |
||||||
|
col_function text, |
||||||
|
is_visible smallint, |
||||||
|
visible_size smallint, |
||||||
|
is_aggregate smallint, |
||||||
|
resultset_id integer, |
||||||
|
sortnr integer, |
||||||
|
description TEXT |
||||||
|
); |
||||||
|
|
||||||
|
CREATE temp TABLE tmp_rpta_column_layout |
||||||
|
( |
||||||
|
uniquename varchar(255) NOT NULL, |
||||||
|
caption varchar(255), |
||||||
|
resultset_id integer, |
||||||
|
whereclause text, |
||||||
|
description text |
||||||
|
); |
||||||
|
|
||||||
|
insert into tmp_rpta_column_layout( |
||||||
|
resultset_id, |
||||||
|
uniquename, |
||||||
|
caption, |
||||||
|
whereclause, |
||||||
|
description |
||||||
|
) |
||||||
|
select tid, |
||||||
|
'${rpta_column_layout.uniquename}', |
||||||
|
'${rpta_column_layout.caption}', |
||||||
|
'${rpta_column_layout.whereclause}', |
||||||
|
'${rpta_column_layout.description}' |
||||||
|
FROM rpta_resultset |
||||||
|
where uniquename='${rpta_column_layout.rpta_resultset}'; |
||||||
|
|
||||||
|
<#assign sortnr=0 /> |
||||||
|
<#foreach column in rpta_columns> |
||||||
|
<#assign sortnr=sortnr +1 /> |
||||||
|
|
||||||
|
INSERT INTO tmp_rpta_column |
||||||
|
(resultset_id, |
||||||
|
uniquename, |
||||||
|
caption, |
||||||
|
srcfieldname, |
||||||
|
targetfieldname, |
||||||
|
column_type, |
||||||
|
col_function, |
||||||
|
is_visible, |
||||||
|
visible_size, |
||||||
|
is_aggregate, |
||||||
|
sortnr, |
||||||
|
description |
||||||
|
) |
||||||
|
select R.tid, |
||||||
|
'${column.uniquename}', |
||||||
|
'${column.caption}', |
||||||
|
'${column.srcfieldname}', |
||||||
|
<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>, |
||||||
|
T.tid as column_type, |
||||||
|
'${column.col_function}', |
||||||
|
${column.is_visible}, |
||||||
|
${column.visible_size}, |
||||||
|
${column.is_aggregate}, |
||||||
|
${sortnr*10}, |
||||||
|
'${column.description}' |
||||||
|
FROM rpta_resultset R, rpta_column_type T |
||||||
|
where R.uniquename='${rpta_column_layout.rpta_resultset}' |
||||||
|
and T.uniquename='${column.column_type}'; |
||||||
|
|
||||||
|
</#foreach> |
||||||
|
|
||||||
|
|
||||||
|
select * into temp tmp_rpta_column2layout |
||||||
|
from rpta_column2layout |
||||||
|
where layout_id in (select L.tid |
||||||
|
from rpta_column_layout L,rpta_resultset R |
||||||
|
where R.tid=L.resultset_id |
||||||
|
and R.uniquename='${rpta_column_layout.rpta_resultset}' |
||||||
|
and L.uniquename='${rpta_column_layout.uniquename}' |
||||||
|
) |
||||||
|
; |
||||||
|
|
||||||
|
select * into temp tmp_rpta_column_layout_target |
||||||
|
from rpta_column_layout |
||||||
|
where resultset_id in (select tid |
||||||
|
FROM rpta_resultset |
||||||
|
where uniquename='${rpta_column_layout.rpta_resultset}') |
||||||
|
and uniquename in (select uniquename from tmp_rpta_column_layout) |
||||||
|
; |
||||||
|
|
||||||
|
insert into rpta_column_layout |
||||||
|
(uniquename, |
||||||
|
caption, |
||||||
|
resultset_id, |
||||||
|
whereclause, |
||||||
|
description) |
||||||
|
select uniquename, |
||||||
|
caption, |
||||||
|
resultset_id, |
||||||
|
whereclause, |
||||||
|
description |
||||||
|
FROM tmp_rpta_column_layout T |
||||||
|
where 0=(select count(*) from tmp_rpta_column_layout_target T2 |
||||||
|
where T.uniquename=T2.uniquename); |
||||||
|
|
||||||
|
drop table tmp_rpta_column_layout_target; |
||||||
|
|
||||||
|
delete from rpta_column2layout |
||||||
|
where layout_id in (select L.tid |
||||||
|
from rpta_column_layout L,rpta_resultset R |
||||||
|
where R.tid=L.resultset_id |
||||||
|
and R.uniquename='${rpta_column_layout.rpta_resultset}' |
||||||
|
and L.uniquename='${rpta_column_layout.uniquename}' |
||||||
|
) |
||||||
|
; |
||||||
|
|
||||||
|
select * into temp tmp_rpta_column2 |
||||||
|
from tmp_rpta_column T |
||||||
|
where (resultset_id,uniquename) not in |
||||||
|
(select resultset_id,uniquename from rpta_column); |
||||||
|
|
||||||
|
INSERT INTO rpta_column |
||||||
|
(resultset_id, |
||||||
|
uniquename, |
||||||
|
caption, |
||||||
|
srcfieldname, |
||||||
|
targetfieldname, |
||||||
|
column_type, |
||||||
|
col_function, |
||||||
|
is_aggregate, |
||||||
|
description, |
||||||
|
custom |
||||||
|
) |
||||||
|
select |
||||||
|
resultset_id, |
||||||
|
uniquename, |
||||||
|
caption, |
||||||
|
srcfieldname, |
||||||
|
targetfieldname, |
||||||
|
column_type, |
||||||
|
col_function, |
||||||
|
is_aggregate, |
||||||
|
description, |
||||||
|
0 as custom |
||||||
|
from tmp_rpta_column2; |
||||||
|
|
||||||
|
--evtl. neuen Satz einfügen, dann alle updaten |
||||||
|
|
||||||
|
update rpta_column set ( caption, |
||||||
|
srcfieldname, |
||||||
|
targetfieldname, |
||||||
|
column_type, |
||||||
|
col_function, |
||||||
|
is_aggregate, |
||||||
|
description) |
||||||
|
= (select caption, |
||||||
|
srcfieldname, |
||||||
|
targetfieldname, |
||||||
|
column_type, |
||||||
|
col_function, |
||||||
|
is_aggregate, |
||||||
|
description |
||||||
|
from tmp_rpta_column T |
||||||
|
where T.resultset_id=rpta_column.resultset_id |
||||||
|
and T.uniquename=rpta_column.uniquename) |
||||||
|
where custom=0 |
||||||
|
and (resultset_id,uniquename) in |
||||||
|
(select T.resultset_id,T.uniquename |
||||||
|
from tmp_rpta_column T) |
||||||
|
; |
||||||
|
|
||||||
|
drop table tmp_rpta_column2; |
||||||
|
|
||||||
|
insert into rpta_column2layout(column_id, |
||||||
|
layout_id, |
||||||
|
sortnr, |
||||||
|
is_visible, |
||||||
|
visible_size, |
||||||
|
caption, |
||||||
|
description) |
||||||
|
select C.tid as column_id, |
||||||
|
L.tid as layout_id, |
||||||
|
T.sortnr, |
||||||
|
T.is_visible, |
||||||
|
T.visible_size, |
||||||
|
T.caption, |
||||||
|
T.description |
||||||
|
FROM rpta_column C, rpta_column_layout L, tmp_rpta_column T |
||||||
|
where C.uniquename=T.uniquename |
||||||
|
and C.resultset_id=T.resultset_id |
||||||
|
and L.uniquename='${rpta_column_layout.uniquename}' |
||||||
|
and L.resultset_id=T.resultset_id |
||||||
|
; |
||||||
|
drop table tmp_rpta_column; |
||||||
|
drop TABLE tmp_rpta_column_layout; |
||||||
|
|
||||||
|
|
@ -1,181 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_stud_astat_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='sos_stud_astat'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"sos_stud_astat_stip", |
|
||||||
"caption":"Stipendiaten", |
|
||||||
"rpta_resultset":"sos_stud_astat", |
|
||||||
"whereclause":"matrikel_nr in (select matrikel_nr from stip_meldung)", |
|
||||||
"sortclause":"matrikel_nr,dim_studiengang_stg,dim_studiengang_abschluss", |
|
||||||
"description":"Stipendiaten" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"matrikel_nr", |
|
||||||
"caption":"Matrikel-Nr.", |
|
||||||
"srcfieldname":"matrikel_nr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"INT_NO_SEP", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"ggf. pseudonymisiert, bei Datenquelle HIS1 ist dies die student.id" |
|
||||||
}, |
|
||||||
{"uniquename":"vorname", |
|
||||||
"caption":"Vorname", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"vorname", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select A.firstname from sos_stud_address A where A.matrikel_nr=tmp_sos_stud_astat.matrikel_nr and A.firstname is not null", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"nachname", |
|
||||||
"caption":"Nachname", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"nachname", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select A.surname from sos_stud_address A where A.matrikel_nr=tmp_sos_stud_astat.matrikel_nr and A.surname is not null", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"kz_rueck_beur_ein_str", |
|
||||||
"caption":"Rückmeldestatus", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"kz_rueck_beur_ein", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(case when kz_rueck_beur_ein=1 then ''E'' when kz_rueck_beur_ein=2 then ''N'' when kz_rueck_beur_ein=3 then ''R'' else ''unbekannt'' end)", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_stg", |
|
||||||
"caption":"Fach (Schlüssel)", |
|
||||||
"srcfieldname":"dim_studiengang_stg", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_abschluss", |
|
||||||
"caption":"Abschluss (intern) (Schlüssel)", |
|
||||||
"srcfieldname":"dim_studiengang_abschluss", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"fach_sem_zahl", |
|
||||||
"caption_der_spalte":"Fach-Sem.", |
|
||||||
"caption_in_ergebnistabelle":"Fach-Sem.", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"fach_sem_zahl", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(select LPAD(fach_sem_zahl::TEXT, 2, ''0''))", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"individual_number_of_semesters_int", |
|
||||||
"caption_der_spalte":"Studierende (intern und amtlich) - Individuelle Regelstudienzeit", |
|
||||||
"caption_in_ergebnistabelle":"Individuelle Regelstudienzeit", |
|
||||||
"srcfieldname":"individual_number_of_semesters", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"INTEGER", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"adresszusatz", |
|
||||||
"caption":"Adresszusatz", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"adresszusatz", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"null::varchar(255)", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"street", |
|
||||||
"caption":"Straße", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"street", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select A.street from sos_stud_address A where A.matrikel_nr=tmp_sos_stud_astat.matrikel_nr", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"postcode", |
|
||||||
"caption":"PLZ", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"postcode", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select A.postcode from sos_stud_address A where A.matrikel_nr=tmp_sos_stud_astat.matrikel_nr", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"city", |
|
||||||
"caption":"Ort", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"city", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select A.city from sos_stud_address A where A.matrikel_nr=tmp_sos_stud_astat.matrikel_nr", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"foerdermonat", |
|
||||||
"caption":"Fördermonat", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"foerdermonat", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select M.foerdermonat from stip_meldung M where M.matrikel_nr=tmp_sos_stud_astat.matrikel_nr", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"bafoeg", |
|
||||||
"caption":"Bafög", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"bafoeg", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select M.bafoeg from stip_meldung M where M.matrikel_nr=tmp_sos_stud_astat.matrikel_nr", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
@ -1,219 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_stud_astat_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='sos_stud_astat'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"sos_stud_astat_stip_meldung", |
|
||||||
"caption":"Stipendiaten (amtlich)", |
|
||||||
"rpta_resultset":"sos_stud_astat", |
|
||||||
"whereclause":"matrikel_nr in (select matrikel_nr from stip_meldung)", |
|
||||||
"sortclause":"", |
|
||||||
"description":"Stipendiaten (amtlich)" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
{"uniquename":"stip_amtl_berichts_id", |
|
||||||
"caption":"Berichts - ID", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"stip_amtl_berichts_id", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"sos_k_stort_astat", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"berichtsland", |
|
||||||
"caption":"Berichtsland", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"berichtsland", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select LPAD(apnr::TEXT, 2, ''0'') from cif where key=659", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"berichtsjahr", |
|
||||||
"caption":"Berichtsjahr", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"sem_rueck_beur_ein", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(select sem_rueck_beur_ein/10::integer)", |
|
||||||
"format_code":"INT_NO_SEP", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"hochschulart", |
|
||||||
"caption":"Hochschulart", |
|
||||||
"srcfieldname":"hs_nr", |
|
||||||
"targetfieldname":"hochschulart", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(select case when art=''FH'' then 6 when art=''U'' then 1 end from kenn_hochschulen H where H.hs_nr in (select hs_nr from hochschulinfo))", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"swf_sos_k_stort_astat", |
|
||||||
"caption":"Hochschul-Nr.", |
|
||||||
"srcfieldname":"sos_k_stort_astat", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"traeger_hs", |
|
||||||
"caption":"Hochschul-Träger", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"traeger_hs", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"2::integer", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"id_nummer", |
|
||||||
"caption":"ID-Nummer", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"id_nummer", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"null::integer", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"geschlecht", |
|
||||||
"caption":"Geschlecht", |
|
||||||
"srcfieldname":"geschlecht", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"ca12_staat", |
|
||||||
"caption":"Staatsangehörigkeit", |
|
||||||
"srcfieldname":"ca12_staat", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(select LPAD(ca12_staat::TEXT, 3, ''0''))", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"hssem", |
|
||||||
"caption":"HS-Sem.", |
|
||||||
"srcfieldname":"hssem", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(select LPAD(hssem::TEXT, 2, ''0''))", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"fach_sem_zahl", |
|
||||||
"caption":"Fach-Sem.", |
|
||||||
"srcfieldname":"fach_sem_zahl", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(select LPAD(fach_sem_zahl::TEXT, 2, ''0''))", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_abschluss_3steller", |
|
||||||
"caption":"Abschluss", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"dim_studiengang_abschluss_3steller", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"sos_k_stufrm_astat || dim_studiengang_abschluss_astat", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Amtlicher Abschluss 3steller" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_stg_astat_3steller", |
|
||||||
"caption_der_spalte":"Fach amtlich (Land) 3steller", |
|
||||||
"caption_in_ergebnistabelle":"Studienfach", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"dim_studiengang_stg_astat_3steller", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(case when length(ltrim(dim_studiengang_stg_astat, ''0'')) <= 3 then right(dim_studiengang_stg_astat, 3) else dim_studiengang_stg_astat end)", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Amtliches Fach (Land) 3steller" |
|
||||||
}, |
|
||||||
{"uniquename":"foerdermonat", |
|
||||||
"caption":"Förder-Monate", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"foerdermonat", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select LPAD(M.foerdermonat::TEXT, 3, ''0'') from stip_meldung M where M.matrikel_nr=tmp_sos_stud_astat.matrikel_nr", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"bafoeg_amtlich", |
|
||||||
"caption":"Bafög", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"bafoeg_amtlich", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select case M.bafoeg when ''j'' then 1 when ''n'' then 2 else null end from stip_meldung M where M.matrikel_nr=tmp_sos_stud_astat.matrikel_nr", |
|
||||||
"format_code":"", |
|
||||||
"is_visible":"1", |
|
||||||
"is_aggregate":0, |
|
||||||
"visible_size":10, |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"matrikel_nr", |
|
||||||
"caption":"Matrikelnummer", |
|
||||||
"srcfieldname":"matrikel_nr", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"format_code":"INT_NO_SEP", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"ggf. pseudonymisiert, bei Datenquelle HIS1 ist dies die student.id" |
|
||||||
}, |
|
||||||
{"uniquename":"nachname", |
|
||||||
"caption":"Name", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"nachname", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select A.surname from sos_stud_address A where A.matrikel_nr=tmp_sos_stud_astat.matrikel_nr and A.surname is not null", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
}, |
|
||||||
{"uniquename":"vorname", |
|
||||||
"caption":"Vorname", |
|
||||||
"srcfieldname":"", |
|
||||||
"targetfieldname":"vorname", |
|
||||||
"column_type":"lookupColumn", |
|
||||||
"col_function":"select A.firstname from sos_stud_address A where A.matrikel_nr=tmp_sos_stud_astat.matrikel_nr and A.firstname is not null", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"10", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"" |
|
||||||
} |
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
@ -1,707 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<#include "RPTA-Makros"/> |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_stud_astat_exists"> |
|
||||||
select count(*) from rpta_resultset where uniquename='sos_stud_astat'; |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
<#assign rpta_column_layout = {"uniquename":"sos_stud_stat_geschl_staat", |
|
||||||
"caption":"Studierendenstatistik nach Staatsang., Geschl. etc.", |
|
||||||
"rpta_resultset":"sos_stud_astat", |
|
||||||
"whereclause":"", |
|
||||||
"description":"Studierendenstatistik (Staat, Geschl., Fachsem.)" |
|
||||||
} |
|
||||||
/> |
|
||||||
|
|
||||||
<#assign rpta_columns = [ |
|
||||||
|
|
||||||
{"uniquename":"dim_studiengang_fb", |
|
||||||
"caption":"FB", |
|
||||||
"srcfieldname":"dim_studiengang_fb", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"INT_NO_SEP", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Fachbereich" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_fb_str", |
|
||||||
"caption":"FB-Name", |
|
||||||
"srcfieldname":"dim_studiengang_fb_str", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Fachbereichname" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_stg_str", |
|
||||||
"caption":"Studienfach", |
|
||||||
"srcfieldname":"dim_studiengang_stg_str", |
|
||||||
"targetfieldname":"", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Name des Studienfachs" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_abschluss", |
|
||||||
"caption":"Abschluss", |
|
||||||
"srcfieldname":"dim_studiengang_abschluss", |
|
||||||
"targetfieldname":"", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Abschluss" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_abschlussart", |
|
||||||
"caption":"abschlussart", |
|
||||||
"srcfieldname":"dim_studiengang_abschlussart", |
|
||||||
"targetfieldname":"", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Abschlussart" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_stg", |
|
||||||
"caption":"stg", |
|
||||||
"srcfieldname":"dim_studiengang_stg", |
|
||||||
"targetfieldname":"", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Fach" |
|
||||||
}, |
|
||||||
{"uniquename":"stuart", |
|
||||||
"caption":"Studienart", |
|
||||||
"srcfieldname":"stuart", |
|
||||||
"targetfieldname":"", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"(select druck from cifx where key=616 and apnr=stuart)", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Studienart" |
|
||||||
}, |
|
||||||
{"uniquename":"dim_studiengang_regel", |
|
||||||
"caption_der_spalte":"Regelstudienzeit", |
|
||||||
"caption_in_ergebnistabelle":"RSZ", |
|
||||||
"srcfieldname":"dim_studiengang_regel", |
|
||||||
"targetfieldname":"", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Regelstudienzeit" |
|
||||||
}, |
|
||||||
{"uniquename":"gesamt", |
|
||||||
"caption_der_spalte":"Studierende gesamt", |
|
||||||
"caption_in_ergebnistabelle":"Studierende gesamt", |
|
||||||
"srcfieldname":"summe", |
|
||||||
"column_type":"physicalColumn", |
|
||||||
"col_function":"sum", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Studierende gesamt" |
|
||||||
}, |
|
||||||
{"uniquename":"gesamt_nw", |
|
||||||
"caption_der_spalte":"Studierende gesamt nicht weiblich", |
|
||||||
"caption_in_ergebnistabelle":"Studierende gesamt nicht weiblich", |
|
||||||
"srcfieldname":"summe_nw", |
|
||||||
"targetfieldname":"summe_nw", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when geschlecht<>2 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Studierende gesamt nicht weiblich" |
|
||||||
}, |
|
||||||
{"uniquename":"gesamt_w", |
|
||||||
"caption_der_spalte":"Studierende gesamt weiblich", |
|
||||||
"caption_in_ergebnistabelle":"Studierende gesamt weiblich", |
|
||||||
"caption":"g_w", |
|
||||||
"srcfieldname":"summe_w", |
|
||||||
"targetfieldname":"summe_w", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when geschlecht=2 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Studierende gesamt weiblich" |
|
||||||
}, |
|
||||||
{"uniquename":"gesamt_neue", |
|
||||||
"caption_der_spalte":"Neu- und Ersteinschreiber", |
|
||||||
"caption_in_ergebnistabelle":"Neu- und Ersteinschreiber", |
|
||||||
"srcfieldname":"summe_neue", |
|
||||||
"targetfieldname":"summe_neue", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when kz_rueck_beur_ein in (1,2) then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Neu- und Ersteinschreiber im Studiengang" |
|
||||||
}, |
|
||||||
{"uniquename":"gesamt_neue_nw", |
|
||||||
"caption_der_spalte":"nicht weibl. Neu- und Ersteinschreiber", |
|
||||||
"caption_in_ergebnistabelle":"nicht weibl. Neu- und Ersteinschreiber", |
|
||||||
"srcfieldname":"summe_neue_nw", |
|
||||||
"targetfieldname":"summe_neue_nw", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when geschlecht<>2 and kz_rueck_beur_ein in (1,2) then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"nicht weibliche Neu- und Ersteinschreiber im Studiengang" |
|
||||||
}, |
|
||||||
{"uniquename":"gesamt_neue_w", |
|
||||||
"caption_der_spalte":"weibl. Neu- und Ersteinschreiber", |
|
||||||
"caption_in_ergebnistabelle":"weibl. Neu- und Ersteinschreiber", |
|
||||||
"srcfieldname":"summe_neue_w", |
|
||||||
"targetfieldname":"summe_neue_w", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when geschlecht=2 and kz_rueck_beur_ein in (1,2) then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"weibliche Neu- und Ersteinschreiber im Studiengang" |
|
||||||
}, |
|
||||||
{"uniquename":"deutsche", |
|
||||||
"caption_der_spalte":"deutsche Stud.", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Stud.", |
|
||||||
"srcfieldname":"summe_deutsche", |
|
||||||
"targetfieldname":"summe_deutsche", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende" |
|
||||||
}, |
|
||||||
{"uniquename":"d_nw", |
|
||||||
"caption_der_spalte":"deutsche nicht weibl. Stud.", |
|
||||||
"caption_in_ergebnistabelle":"deutsche nicht weibl. Stud.", |
|
||||||
"srcfieldname":"summe_d_nw", |
|
||||||
"targetfieldname":"summe_d_nw", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat=0 and geschlecht<>2 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche nicht weibliche Studierende" |
|
||||||
}, |
|
||||||
{"uniquename":"d_w", |
|
||||||
"caption_der_spalte":"deutsche weibl. Stud.", |
|
||||||
"caption_in_ergebnistabelle":"deutsche weibl. Stud.", |
|
||||||
"srcfieldname":"summe_d_w", |
|
||||||
"targetfieldname":"summe_d_w", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat=0 and geschlecht=2 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche weibliche Studierende" |
|
||||||
}, |
|
||||||
{"uniquename":"d_nw1h", |
|
||||||
"caption_der_spalte":"deutsche nicht weibl. Stud. im 1.HS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche nicht weibl. Stud. im 1.HS", |
|
||||||
"caption":"d_nw1h", |
|
||||||
"srcfieldname":"summe_d_nw1h", |
|
||||||
"targetfieldname":"summe_d_nw1h", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat=0 and geschlecht<>2 and hssem=1 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche nicht weibliche Studierende im 1. Hochschulsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"d_w1h", |
|
||||||
"caption_der_spalte":"deutsche weibl. Stud. im 1.HS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche weibl. Stud. im 1.HS", |
|
||||||
"srcfieldname":"summe_d_w1h", |
|
||||||
"targetfieldname":"summe_d_w1h", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat=0 and geschlecht=2 and hssem=1 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche weibliche Studierende im 1. Hochschulsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"d_nw1f", |
|
||||||
"caption_der_spalte":"deutsche nicht weibl. Stud. im 1.FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche nicht weibl. Stud. im 1.FS", |
|
||||||
"srcfieldname":"summe_d_nw1f", |
|
||||||
"targetfieldname":"summe_d_nw1f", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat=0 and geschlecht<>2 and fach_sem_zahl=1 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche nicht weibliche Studierende im 1. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"d_w1f", |
|
||||||
"caption_der_spalte":"deutsche weibl. Stud. im 1.FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche weibl. Stud. im 1.FS", |
|
||||||
"srcfieldname":"summe_d_w1f", |
|
||||||
"targetfieldname":"summe_d_w1f", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat=0 and geschlecht=2 and fach_sem_zahl=1 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche weibliche Studierende im 1. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"ausl", |
|
||||||
"caption_der_spalte":"ausländische Studierende", |
|
||||||
"caption_in_ergebnistabelle":"ausländische Studierende", |
|
||||||
"srcfieldname":"summe_ausl", |
|
||||||
"targetfieldname":"summe_ausl", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausländische Studierende" |
|
||||||
}, |
|
||||||
{"uniquename":"a_nw", |
|
||||||
"caption_der_spalte":"ausländische nicht weibliche Studierende", |
|
||||||
"caption_in_ergebnistabelle":"ausländische nicht weibliche Studierende", |
|
||||||
"srcfieldname":"summe_a_nw", |
|
||||||
"targetfieldname":"summe_a_nw", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat<>0 and geschlecht<>2 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausländische nicht weibliche Studierende" |
|
||||||
}, |
|
||||||
{"uniquename":"a_w", |
|
||||||
"caption_der_spalte":"ausländische weibliche Studierende", |
|
||||||
"caption_in_ergebnistabelle":"ausländische weibliche Studierende", |
|
||||||
"srcfieldname":"summe_a_w", |
|
||||||
"targetfieldname":"summe_a_w", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat<>0 and geschlecht=2 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausländische weibliche Studierende" |
|
||||||
}, |
|
||||||
{"uniquename":"a_nw1h", |
|
||||||
"caption_der_spalte":"ausländische nicht weibliche Studierende im 1. HS", |
|
||||||
"caption_in_ergebnistabelle":"ausländische nicht weibliche Studierende im 1. HS", |
|
||||||
"srcfieldname":"summe_a_nw1h", |
|
||||||
"targetfieldname":"summe_a_nw1h", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat<>0 and geschlecht<>2 and hssem=1 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausländische nicht weibliche Studierende im 1. Hochschulsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"a_w1h", |
|
||||||
"caption_der_spalte":"ausländische weibliche Studierende im 1. HS", |
|
||||||
"caption_in_ergebnistabelle":"ausländische weibliche Studierende im 1. HS", |
|
||||||
"srcfieldname":"summe_a_w1h", |
|
||||||
"targetfieldname":"summe_a_w1h", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat<>0 and geschlecht=2 and hssem=1 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausländische weibliche Studierende im 1. Hochschulsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"a_nw1f", |
|
||||||
"caption_der_spalte":"ausländische nicht weibliche Studierende im 1. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausländische nicht weibliche Studierende im 1. FS", |
|
||||||
"srcfieldname":"summe_a_nw1f", |
|
||||||
"targetfieldname":"summe_a_nw1f", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat<>0 and geschlecht<>2 and fach_sem_zahl=1 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausländische nicht weibliche Studierende im 1. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"a_w1f", |
|
||||||
"caption_der_spalte":"ausländische weibliche Studierende im 1. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausländische weibliche Studierende im 1. FS", |
|
||||||
"srcfieldname":"summe_a_w1f", |
|
||||||
"targetfieldname":"summe_a_w1f", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat<>0 and geschlecht=2 and fach_sem_zahl=1 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausländische weibliche Studierende im 1. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"HS1", |
|
||||||
"caption_der_spalte":"Studierende im 1. HS", |
|
||||||
"caption_in_ergebnistabelle":"Studierende im 1.HS", |
|
||||||
"srcfieldname":"summe_HS1", |
|
||||||
"targetfieldname":"summe_HS1", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when hssem=1 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Studierende im 1. Hochschulsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS1_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 1. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 1.FS", |
|
||||||
"srcfieldname":"summe_FS1_d", |
|
||||||
"targetfieldname":"summe_FS1_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=1 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 1. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS1_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 1. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 1.FS", |
|
||||||
"srcfieldname":"summe_FS1_a", |
|
||||||
"targetfieldname":"summe_FS1_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=1 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 1. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS2_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 2. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 2.FS", |
|
||||||
"srcfieldname":"summe_FS2_d", |
|
||||||
"targetfieldname":"summe_FS2_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=2 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 2. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS2_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 2. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 2.FS", |
|
||||||
"srcfieldname":"summe_FS2_a", |
|
||||||
"targetfieldname":"summe_FS2_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=2 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 2. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS3_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 3. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 3.FS", |
|
||||||
"srcfieldname":"summe_FS3_d", |
|
||||||
"targetfieldname":"summe_FS3_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=3 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 3. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS3_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 3. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 3. FS", |
|
||||||
"srcfieldname":"summe_FS3_a", |
|
||||||
"targetfieldname":"summe_FS3_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=3 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 3. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS4_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 4. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 4.FS", |
|
||||||
"srcfieldname":"summe_FS4_d", |
|
||||||
"targetfieldname":"summe_FS4_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=4 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 4. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS4_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 4. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 4. FS", |
|
||||||
"srcfieldname":"summe_FS4_a", |
|
||||||
"targetfieldname":"summe_FS4_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=4 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 4. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS5_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 5. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 5.FS", |
|
||||||
"srcfieldname":"summe_FS5_d", |
|
||||||
"targetfieldname":"summe_FS5_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=5 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 5. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS5_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 5. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 5. FS", |
|
||||||
"srcfieldname":"summe_FS5_a", |
|
||||||
"targetfieldname":"summe_FS5_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=5 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 5. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS6_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 6. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 6.FS", |
|
||||||
"srcfieldname":"summe_FS6_d", |
|
||||||
"targetfieldname":"summe_FS6_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=6 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 6. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS6_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 6. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 6. FS", |
|
||||||
"srcfieldname":"summe_FS6_a", |
|
||||||
"targetfieldname":"summe_FS6_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=6 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 6. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS7_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 7. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 7.FS", |
|
||||||
"srcfieldname":"summe_FS7_d", |
|
||||||
"targetfieldname":"summe_FS7_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=7 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 7. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS7_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 7. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 7. FS", |
|
||||||
"srcfieldname":"summe_FS7_a", |
|
||||||
"targetfieldname":"summe_FS7_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=7 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 7. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS8_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 8. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 8.FS", |
|
||||||
"srcfieldname":"summe_FS8_d", |
|
||||||
"targetfieldname":"summe_FS8_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=8 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 8. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS8_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 8. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 8. FS", |
|
||||||
"srcfieldname":"summe_FS8_a", |
|
||||||
"targetfieldname":"summe_FS8_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=8 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 8. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS9_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 9. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 9.FS", |
|
||||||
"srcfieldname":"summe_FS9_d", |
|
||||||
"targetfieldname":"summe_FS9_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=9 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 9. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS9_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 9. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 9. FS", |
|
||||||
"srcfieldname":"summe_FS9_a", |
|
||||||
"targetfieldname":"summe_FS9_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=9 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 9. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS10_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 10. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 10.FS", |
|
||||||
"srcfieldname":"summe_FS10_d", |
|
||||||
"targetfieldname":"summe_FS10_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=10 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 10. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS10_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 10. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 10. FS", |
|
||||||
"srcfieldname":"summe_FS10_a", |
|
||||||
"targetfieldname":"summe_FS10_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=10 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 10. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS11_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende im 11. FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende im 11.FS", |
|
||||||
"srcfieldname":"summe_FS11_d", |
|
||||||
"targetfieldname":"summe_FS11_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=11 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende im 11. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FS11_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende im 11. FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende im 11. FS", |
|
||||||
"srcfieldname":"summe_FS11_a", |
|
||||||
"targetfieldname":"summe_FS11_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl=11 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende im 11. Fachsemester" |
|
||||||
}, |
|
||||||
{"uniquename":"FSg11_d", |
|
||||||
"caption_der_spalte":"deutsche Studierende mit mehr als 11 FS", |
|
||||||
"caption_in_ergebnistabelle":"deutsche Studierende mit mehr als 11 FS", |
|
||||||
"srcfieldname":"summe_FSg11_d", |
|
||||||
"targetfieldname":"summe_FSg11_d", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl>11 and ca12_staat=0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"deutsche Studierende mit mehr als 11 Fachsemestern" |
|
||||||
}, |
|
||||||
{"uniquename":"FSg11_a", |
|
||||||
"caption_der_spalte":"ausl. Studierende mit mehr als 11 FS", |
|
||||||
"caption_in_ergebnistabelle":"ausl. Studierende mit mehr als 11 FS", |
|
||||||
"srcfieldname":"summe_FSg11_a", |
|
||||||
"targetfieldname":"summe_FSg11_a", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl>11 and ca12_staat<>0 then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"ausl. Studierende mit mehr als 11 Fachsemestern" |
|
||||||
}, |
|
||||||
{"uniquename":"SRSZw", |
|
||||||
"caption_der_spalte":"Studierende in der RSZ weiblich", |
|
||||||
"caption_in_ergebnistabelle":"Studierende in der RSZ weiblich", |
|
||||||
"srcfieldname":"summe_SRSZw", |
|
||||||
"targetfieldname":"summe_SRSZw", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when geschlecht=2 and fach_sem_zahl<=dim_studiengang_regel then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Studierende in der Regelstudienzeit weiblich" |
|
||||||
}, |
|
||||||
{"uniquename":"SRSZD", |
|
||||||
"caption_der_spalte":"Studierende in der RSZ deutsch", |
|
||||||
"caption_in_ergebnistabelle":"Studierende in der RSZ deutsch", |
|
||||||
"srcfieldname":"summe_SRSZD", |
|
||||||
"targetfieldname":"summe_SRSZD", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when ca12_staat=0 and fach_sem_zahl<=dim_studiengang_regel then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Studierende in der Regelstudienzeit deutsch" |
|
||||||
}, |
|
||||||
{"uniquename":"SRSZgesamt", |
|
||||||
"caption_der_spalte":"Studierende in der RSZ gesamt", |
|
||||||
"caption_in_ergebnistabelle":"Studierende in der RSZ gesamt", |
|
||||||
"srcfieldname":"summe_SRSZgesamt", |
|
||||||
"targetfieldname":"summe_SRSZgesamt", |
|
||||||
"column_type":"logicalColumn", |
|
||||||
"col_function":"case when fach_sem_zahl<=dim_studiengang_regel then summe else 0 end", |
|
||||||
"is_visible":"1", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"1", |
|
||||||
"description":"Studierende in der Regelstudienzeit gesamt" |
|
||||||
}, |
|
||||||
{"uniquename":"SRSZquote", |
|
||||||
"caption_der_spalte":"Quote Studierende in der RSZ", |
|
||||||
"caption_in_ergebnistabelle":"Quote Studierende in der RSZ", |
|
||||||
"srcfieldname":"summe_SRSZquote", |
|
||||||
"targetfieldname":"summe_SRSZquote", |
|
||||||
"column_type":"computedColumn", |
|
||||||
"col_function":"((100.00 * summe_SRSZgesamt) / summe)", |
|
||||||
"is_visible":"1", |
|
||||||
"format_code":"INT_PERCENT", |
|
||||||
"visible_size":"5", |
|
||||||
"is_aggregate":"0", |
|
||||||
"description":"Anteil Studierender in der Regelstudienzeit" |
|
||||||
} |
|
||||||
|
|
||||||
] |
|
||||||
/> |
|
||||||
|
|
||||||
<@rpta_column_layout_fuellen /> |
|
@ -1,384 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="rpta_exam_unit_exists"> |
|
||||||
select sp_table_exists('rpta_exam_unit') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='rpta_exam_unit' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"><![CDATA[ |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'dim_studiengang.tid=rpta_exam_unit.tid_stg and rpta_exam_unit.sem_der_pruefung >= semester_von and rpta_exam_unit.sem_der_pruefung <= semester_bis' as joinclause |
|
||||||
from sx_tables where name in ('dim_studiengang') |
|
||||||
|
|
||||||
]]></sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'dim_studiengang_' || name as targetname |
|
||||||
from sx_fields where table_name ='dim_studiengang' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
|
|
||||||
order by 1 |
|
||||||
|
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if rpta_exam_unit_exists==1> |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"rpta_exam_unit_dim_studiengang", "caption":"Einzelprüfungen und Studiengänge"} |
|
||||||
/> |
|
||||||
|
|
||||||
drop index if exists ix_rpta_exam_unit_is_modul; |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='rpta_exam_unit' |
|
||||||
and name!='summe'; |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='rpta_exam_unit' |
|
||||||
and name='summe'; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
7 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn rpta_exam_unit_exists=1 |
|
@ -1,395 +0,0 @@ |
|||||||
|
|
||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sva_sgd_aggr_exists"> |
|
||||||
select sp_table_exists('sva_sgd_aggr') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='sva_sgd_aggr' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"><![CDATA[ |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_sgd.sgd_join_id=sva_sgd_aggr.stellen_nr' as joinclause |
|
||||||
from sx_tables where name in ('sva_sgd') |
|
||||||
union |
|
||||||
select 2::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sva_sgd_aggr.stellen_nr=sva_pbe_aggr.stellen_nr and (sva_sgd_aggr.sbst_nr=sva_pbe_aggr.soe_serial or sva_pbe_aggr.soe_serial is null )' as joinclause |
|
||||||
from sx_tables where name in ('sva_pbe_aggr') |
|
||||||
]]></sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
union |
|
||||||
</#if> |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_sgd_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_sgd' |
|
||||||
and currentlyused=1 |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'sva_pbe_aggr_' || name as targetname |
|
||||||
from sx_fields where table_name ='sva_pbe_aggr' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
order by 1 |
|
||||||
|
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if sva_sgd_aggr_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"sva_pbe_aggr_sgd", "caption":"Stellen, Besetzungen, Personen"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='sva_sgd_aggr' |
|
||||||
and name!='vzae'; |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='sva_sgd_aggr' |
|
||||||
and name='vzae'; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
6 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn sva_sgd_aggr_exists=1 |
|
@ -1,450 +0,0 @@ |
|||||||
--freemarker template |
|
||||||
<sqlvars> |
|
||||||
<sqlvar name="sos_stud_gewichtung_exists"> |
|
||||||
select sp_table_exists('sos_stud_gewichtung') from xdummy; |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fact_table_source"> |
|
||||||
select name |
|
||||||
from sx_tables where name ='sos_stud_gewichtung' |
|
||||||
|
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="added_tables" type="hashsequence"> |
|
||||||
select 1::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'dim_studiengang_gew.tid=sos_stud_gewichtung.tid_stg' as joinclause |
|
||||||
from sx_tables where name in ('dim_studiengang_gew') |
|
||||||
union |
|
||||||
select 10::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'dim_studiengang_gew.stort=sos_k_stort.apnr' as joinclause |
|
||||||
from sx_tables where name in ('sos_k_stort') |
|
||||||
union |
|
||||||
select 20::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sos_stud_gewichtung.stutyp=sos_k_stutyp.apnr' as joinclause |
|
||||||
from sx_tables where name in ('sos_k_stutyp') |
|
||||||
union |
|
||||||
select 30::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sos_stud_gewichtung.stuart=sos_k_stuart.apnr' as joinclause |
|
||||||
from sx_tables where name in ('sos_k_stuart') |
|
||||||
union |
|
||||||
select 40::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sos_stud_gewichtung.stufrm=sos_k_stufrm.apnr' as joinclause |
|
||||||
from sx_tables where name in ('sos_k_stufrm') |
|
||||||
union |
|
||||||
select 50::smallint as sortnr, |
|
||||||
name, trim(name) ||'_' as prefix, |
|
||||||
caption, |
|
||||||
'sos_stud_gewichtung.hrst=sos_k_hrst.apnr' as joinclause |
|
||||||
from sx_tables where name in ('sos_k_hrst') |
|
||||||
order by 1 |
|
||||||
</sqlvar> |
|
||||||
<sqlvar name="fields_target" type="hashsequence"><![CDATA[ |
|
||||||
<#if fact_table_source?exists> |
|
||||||
select tid, table_name, |
|
||||||
name, |
|
||||||
name as targetname |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1 |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
union |
|
||||||
select tid,table_name, |
|
||||||
name, |
|
||||||
'${added_table.prefix}' || name as targetname |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1 |
|
||||||
|
|
||||||
</#foreach> |
|
||||||
order by 1 |
|
||||||
</#if> |
|
||||||
]]> |
|
||||||
</sqlvar> |
|
||||||
</sqlvars> |
|
||||||
|
|
||||||
<#if sos_stud_gewichtung_exists==1 && fact_table_source?exists > |
|
||||||
|
|
||||||
<#assign fact_table_target = {"name":"sos_stud_astat_gew", "caption":"Studierende (intern und amtlich) gewichtet"} |
|
||||||
/> |
|
||||||
|
|
||||||
|
|
||||||
CREATE temp table tmp_tables( |
|
||||||
name CHAR(255) , |
|
||||||
caption CHAR(255) , |
|
||||||
description CHAR(255) , |
|
||||||
table_type CHAR(255) , |
|
||||||
systeminfo_id INTEGER , |
|
||||||
systeminfo_orig INTEGER , |
|
||||||
thema CHAR(255) , |
|
||||||
sachgebiete_id CHAR(255) |
|
||||||
); |
|
||||||
CREATE temp TABLE tmp_fields( |
|
||||||
tid serial NOT NULL, |
|
||||||
table_name VARCHAR(255) not null, |
|
||||||
name VARCHAR(255) not null, |
|
||||||
caption VARCHAR(255) , |
|
||||||
description VARCHAR(255) , |
|
||||||
field_type VARCHAR(255) not null, |
|
||||||
field_size VARCHAR(255) , |
|
||||||
field_not_null smallint, |
|
||||||
currentlyused SMALLINT , |
|
||||||
is_primarykey SMALLINT default 0 , |
|
||||||
foreignkey_tab VARCHAR(255) , |
|
||||||
foreignkey_col VARCHAR(255) , |
|
||||||
foreignkey_int VARCHAR(255) , |
|
||||||
foreignkey_cap VARCHAR(255) , |
|
||||||
foreignkey_cond VARCHAR(255) , |
|
||||||
foreignkey_func VARCHAR(255) , |
|
||||||
check_integrity SMALLINT, |
|
||||||
is_sum SMALLINT default 1, |
|
||||||
foreignkey_uniquename VARCHAR(255) |
|
||||||
|
|
||||||
); |
|
||||||
|
|
||||||
|
|
||||||
--Vorbereitung: |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Standorte' |
|
||||||
WHERE name='sos_k_stort'; |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Studienart' |
|
||||||
WHERE name = 'sos_k_stuart'; |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Studiumstyp' |
|
||||||
WHERE name = 'sos_k_stutyp'; |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Studienform' |
|
||||||
WHERE name = 'sos_k_stufrm'; |
|
||||||
UPDATE sx_tables |
|
||||||
SET caption = 'Hörerstatus' |
|
||||||
WHERE name = 'sos_k_hrst'; |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
--drop view if exists sos_stud_astat; |
|
||||||
|
|
||||||
|
|
||||||
drop VIEW sos_k_stutyp; |
|
||||||
|
|
||||||
CREATE VIEW sos_k_stutyp |
|
||||||
( |
|
||||||
apnr, |
|
||||||
druck, |
|
||||||
astat |
|
||||||
) |
|
||||||
AS |
|
||||||
SELECT cifx.apnr, |
|
||||||
cifx.druck, |
|
||||||
astat |
|
||||||
FROM cifx |
|
||||||
WHERE cifx.key = 40; |
|
||||||
|
|
||||||
|
|
||||||
update sx_fields set |
|
||||||
is_sum=0 |
|
||||||
where table_name='sos_stud_gewichtung' |
|
||||||
and name!='summe'; |
|
||||||
update sx_fields set |
|
||||||
is_sum=1 |
|
||||||
where table_name='sos_stud_gewichtung' |
|
||||||
and name='summe'; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_tables ( |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
) |
|
||||||
select |
|
||||||
'${fact_table_target.name}', |
|
||||||
'${fact_table_target.caption}', |
|
||||||
description, |
|
||||||
table_type, |
|
||||||
systeminfo_id, |
|
||||||
thema, |
|
||||||
sachgebiete_id |
|
||||||
from sx_tables where name='${fact_table_source}' |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${fact_table_source}' |
|
||||||
and currentlyused=1; |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
insert into tmp_fields (table_name, |
|
||||||
name, |
|
||||||
caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename) |
|
||||||
select '${fact_table_target.name}' as table_name, |
|
||||||
'${added_table.prefix}' || name, |
|
||||||
'${added_table.caption}: ' || caption, |
|
||||||
description, |
|
||||||
field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyused, |
|
||||||
is_primarykey, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
from sx_fields where table_name ='${added_table.name}' |
|
||||||
and currentlyused=1; |
|
||||||
</#foreach> |
|
||||||
|
|
||||||
CREATE temp TABLE tmp_rpta_resultset |
|
||||||
( |
|
||||||
caption varchar(255), |
|
||||||
uniquename varchar(255), |
|
||||||
fieldclause text, |
|
||||||
joinclause text, |
|
||||||
whereclause text, |
|
||||||
systeminfo_id integer |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
systeminfo_id) |
|
||||||
select '${fact_table_target.caption}', |
|
||||||
'${fact_table_target.name}', |
|
||||||
7 |
|
||||||
; |
|
||||||
|
|
||||||
|
|
||||||
update tmp_rpta_resultset set fieldclause=' |
|
||||||
<#foreach field_target in fields_target> |
|
||||||
${field_target.table_name}.${field_target.name} as ${field_target.targetname}, |
|
||||||
</#foreach> |
|
||||||
null::varchar as dummy', |
|
||||||
joinclause='${fact_table_source} |
|
||||||
<#foreach added_table in added_tables> |
|
||||||
left outer join ${added_table.name} on (${added_table.joinclause}) |
|
||||||
</#foreach>'; |
|
||||||
|
|
||||||
select * into temp tmp_rs1 |
|
||||||
from rpta_resultset |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_resultset set caption=T.caption, |
|
||||||
fieldclause=T.fieldclause, |
|
||||||
joinclause=T.joinclause, |
|
||||||
whereclause=T.whereclause |
|
||||||
from tmp_rpta_resultset T |
|
||||||
where T.systeminfo_id=rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=rpta_resultset.uniquename |
|
||||||
; |
|
||||||
|
|
||||||
insert into rpta_resultset(caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id) |
|
||||||
select caption, |
|
||||||
uniquename, |
|
||||||
fieldclause, |
|
||||||
joinclause, |
|
||||||
whereclause, |
|
||||||
systeminfo_id |
|
||||||
from tmp_rpta_resultset |
|
||||||
where 0=(select count(*) |
|
||||||
from tmp_rs1 T |
|
||||||
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id |
|
||||||
and T.uniquename=tmp_rpta_resultset.uniquename) |
|
||||||
; |
|
||||||
drop table tmp_rpta_resultset; |
|
||||||
drop table tmp_rs1; |
|
||||||
|
|
||||||
delete from sx_tables where name |
|
||||||
in (select T.name from tmp_tables T); |
|
||||||
|
|
||||||
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id) |
|
||||||
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id |
|
||||||
from tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
delete from sx_fields where table_name |
|
||||||
in (select T.table_name from tmp_fields T); |
|
||||||
|
|
||||||
insert into sx_fields (table_name,name,caption,description,field_type, |
|
||||||
field_size, |
|
||||||
field_not_null, |
|
||||||
currentlyUsed, |
|
||||||
foreignkey_tab, |
|
||||||
foreignkey_col, |
|
||||||
foreignkey_cap, |
|
||||||
foreignkey_int, |
|
||||||
foreignkey_cond, |
|
||||||
foreignkey_func, |
|
||||||
check_integrity, |
|
||||||
is_sum, |
|
||||||
foreignkey_uniquename |
|
||||||
) |
|
||||||
select |
|
||||||
F.table_name,F.name,F.caption,F.description,F.field_type, |
|
||||||
F.field_size, |
|
||||||
F.field_not_null, |
|
||||||
F.currentlyUsed, |
|
||||||
F.foreignkey_tab, |
|
||||||
F.foreignkey_col, |
|
||||||
F.foreignkey_cap, |
|
||||||
F.foreignkey_int, |
|
||||||
F.foreignkey_cond, |
|
||||||
F.foreignkey_func, |
|
||||||
F.check_integrity, |
|
||||||
F.is_sum, |
|
||||||
F.foreignkey_uniquename |
|
||||||
|
|
||||||
from tmp_fields F; |
|
||||||
|
|
||||||
|
|
||||||
drop table tmp_fields; |
|
||||||
drop table tmp_tables; |
|
||||||
|
|
||||||
|
|
||||||
--rpta_column füllen: |
|
||||||
select * into temp tmp_rc1 |
|
||||||
from rpta_column; |
|
||||||
|
|
||||||
|
|
||||||
create temp table tmp_rpta_column( |
|
||||||
uniquename varchar(255) NOT NULL, |
|
||||||
caption varchar(255), |
|
||||||
srcfieldname varchar(255), |
|
||||||
column_type integer, |
|
||||||
col_function text, |
|
||||||
is_aggregate smallint, |
|
||||||
resultset_id integer, |
|
||||||
description text, |
|
||||||
custom integer default 0 |
|
||||||
); |
|
||||||
|
|
||||||
insert into tmp_rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description) |
|
||||||
select F.name as uniquename, |
|
||||||
coalesce(T.caption,T.name) || ' - ' || F.caption, |
|
||||||
F.name as srcfieldname, |
|
||||||
1 as column_type, |
|
||||||
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function, |
|
||||||
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
F.description |
|
||||||
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name) |
|
||||||
where F.table_name='${fact_table_target.name}' |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
and F.currentlyused=1 |
|
||||||
; |
|
||||||
|
|
||||||
update rpta_column set |
|
||||||
caption=T.caption, |
|
||||||
srcfieldname=T.srcfieldname, |
|
||||||
column_type=T.column_type, |
|
||||||
col_function=T.col_function, |
|
||||||
is_aggregate=T.is_aggregate, |
|
||||||
resultset_id=R.tid, |
|
||||||
description=T.description, |
|
||||||
custom=T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where T.uniquename=rpta_column.uniquename |
|
||||||
and rpta_column.resultset_id=R.tid |
|
||||||
and R.uniquename='${fact_table_target.name}' |
|
||||||
; |
|
||||||
insert into rpta_column( uniquename, |
|
||||||
caption, |
|
||||||
srcfieldname, |
|
||||||
column_type, |
|
||||||
col_function, |
|
||||||
is_aggregate, |
|
||||||
resultset_id, |
|
||||||
description, |
|
||||||
custom) |
|
||||||
select T.uniquename, |
|
||||||
T.caption, |
|
||||||
T.srcfieldname, |
|
||||||
T.column_type, |
|
||||||
T.col_function, |
|
||||||
T.is_aggregate, |
|
||||||
R.tid as resultset_id, |
|
||||||
T.description, |
|
||||||
T.custom |
|
||||||
from tmp_rpta_column T, rpta_resultset R |
|
||||||
where R.uniquename='${fact_table_target.name}' |
|
||||||
and 0=(select count(*) from tmp_rc1 C |
|
||||||
where C.uniquename=T.uniquename |
|
||||||
and C.resultset_id=R.tid) |
|
||||||
; |
|
||||||
|
|
||||||
drop table tmp_rpta_column; |
|
||||||
drop table tmp_rc1; |
|
||||||
|
|
||||||
</#if> --wenn sos_stud_gewichtung_exists=1 |
|
@ -1,14 +0,0 @@ |
|||||||
|
|
||||||
|
|
||||||
--Duplikate raus: |
|
||||||
|
|
||||||
select uniquename,resultset_id into temp tmp_doppelt |
|
||||||
from rpta_column |
|
||||||
group by 1,2 |
|
||||||
having count(*)>1; |
|
||||||
|
|
||||||
delete from rpta_column where (uniquename,resultset_id) |
|
||||||
in (select uniquename,resultset_id |
|
||||||
from tmp_doppelt); |
|
||||||
|
|
||||||
drop table tmp_doppelt; |
|
@ -1,414 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<!-- Created with Jaspersoft Studio version 6.21.3.final using JasperReports Library version 6.21.3-4a3078d20785ebe464f18037d738d12fc98c13cf --> |
|
||||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Leistungen und Studiengänge" language="groovy" pageWidth="842" pageHeight="5595" orientation="Landscape" columnWidth="818" leftMargin="12" rightMargin="12" topMargin="12" bottomMargin="12" uuid="d58082fe-8941-478b-b06e-8d7250737b92"> |
|
||||||
<property name="net.sf.jasperreports.export.xls.create.custom.palette" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.one.page.per.sheet" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows " value="true"/> |
|
||||||
<property name="net.sf.jasperreports.print.create.bookmarks" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="pageHeader"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageFooter"/> |
|
||||||
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.1" value="pageHeader"/> |
|
||||||
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.2" value="pageFooter"/> |
|
||||||
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Prüfungsergebnisse"/> |
|
||||||
<property name="com.jaspersoft.studio.unit." value="pixel"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.pageHeight" value="pixel"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.pageWidth" value="pixel"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.topMargin" value="pixel"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.bottomMargin" value="pixel"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.leftMargin" value="pixel"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.rightMargin" value="pixel"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.columnWidth" value="pixel"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.columnSpacing" value="pixel"/> |
|
||||||
<template><![CDATA["simple_table.jrtx"]]></template> |
|
||||||
<style name="TableRowDetail" mode="Opaque" forecolor="#000000" backcolor="#FFFFFF" hTextAlign="Right" vTextAlign="Middle" isBlankWhenNull="true" fontName="Liberation Sans" fontSize="8" isBold="false"> |
|
||||||
<box rightPadding="2"> |
|
||||||
<pen lineColor="#000000"/> |
|
||||||
<topPen lineWidth="0.5" lineColor="#030303"/> |
|
||||||
<leftPen lineWidth="0.5" lineColor="#030303"/> |
|
||||||
<bottomPen lineWidth="0.5" lineColor="#030303"/> |
|
||||||
<rightPen lineWidth="0.5" lineColor="#030303"/> |
|
||||||
</box> |
|
||||||
<paragraph leftIndent="2" rightIndent="1" spacingBefore="0" spacingAfter="0"/> |
|
||||||
<conditionalStyle> |
|
||||||
<conditionExpression><![CDATA[Boolean.valueOf( $V{PAGE_COUNT} % 2 == 1 )]]></conditionExpression> |
|
||||||
<style mode="Opaque" forecolor="#000000" backcolor="#E3E8EB"/> |
|
||||||
</conditionalStyle> |
|
||||||
</style> |
|
||||||
<queryString language="xPath"> |
|
||||||
<![CDATA[/ergebnisse/ergebnis/ergebniselement[@ordnr='0']/sqlerg/row]]> |
|
||||||
</queryString> |
|
||||||
<field name="REPORT_HEADING_INSTITUTION" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_HEADING_INSTITUTION]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_HEADING_URL" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_HEADING_URL]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_LOGO_FILE" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_LOGO_FILE]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_HEADING_ADRESS" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_HEADING_ADRESS]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_EMAIL" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_EMAIL]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_DOCUMENTATION_URL" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_DOCUMENTATION_URL]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Berichtsname" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/maskenname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Erlaeuterung" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/explanation]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Hinweis" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/hinweis]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Fach" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="0" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Abschluss" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="1" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Semester der Prüfung (Schlüssel)" class="java.lang.Integer"> |
|
||||||
<fieldDescription><![CDATA[col[@id="2" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Semester der Prüfung" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="3" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="pnr" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="4" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Name der Prüfung" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="5" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Teilnehmer" class="java.lang.Integer"> |
|
||||||
<fieldDescription><![CDATA[col[@id="6" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Durchschnittsnote *" class="java.lang.Double"> |
|
||||||
<fieldDescription><![CDATA[col[@id="7" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Durchfallquote in % *" class="java.lang.Double"> |
|
||||||
<fieldDescription><![CDATA[col[@id="8" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Nicht erschienen" class="java.lang.Integer"> |
|
||||||
<fieldDescription><![CDATA[col[@id="9" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Seit Semester_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Seit Semester"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Seit Semester_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Seit Semester"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Bis Semester_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Bis Semester"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Bis Semester_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Bis Semester"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Semestertyp_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Semestertyp"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Semestertyp_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Semestertyp"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Studiengang_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Studiengang"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Studiengang_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Studiengang"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Fächer_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Fächer"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Fächer_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Fächer"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Abschluss_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Abschluss"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Abschluss_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Abschluss"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_bis Fachsemester_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="bis Fachsemester"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_bis Fachsemester_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="bis Fachsemester"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Spaltenlayout_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Spaltenlayout"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Spaltenlayout_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Spaltenlayout"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Spalten_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Spalten"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Spalten_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Spalten"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="standdatum" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/stand]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="user" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/user]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<variable name="tabellennr" class="java.lang.Integer"> |
|
||||||
<variableExpression><![CDATA[0]]></variableExpression> |
|
||||||
</variable> |
|
||||||
<variable name="MinSemester" class="java.lang.Integer" resetType="Group" resetGroup="Abschluss" calculation="Lowest"> |
|
||||||
<variableExpression><![CDATA[$F{Semester der Prüfung (Schlüssel)}]]></variableExpression> |
|
||||||
</variable> |
|
||||||
<variable name="MaxSemester" class="java.lang.Integer" resetType="Group" resetGroup="Abschluss" calculation="Highest"> |
|
||||||
<variableExpression><![CDATA[$F{Semester der Prüfung (Schlüssel)}]]></variableExpression> |
|
||||||
</variable> |
|
||||||
<group name="tabellennr"> |
|
||||||
<groupExpression><![CDATA[$V{tabellennr}]]></groupExpression> |
|
||||||
</group> |
|
||||||
<group name="Fach"> |
|
||||||
<groupExpression><![CDATA[$F{Fach}]]></groupExpression> |
|
||||||
</group> |
|
||||||
<group name="Abschluss" isStartNewPage="true"> |
|
||||||
<groupExpression><![CDATA[$F{Abschluss}]]></groupExpression> |
|
||||||
<groupHeader> |
|
||||||
<band height="60"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="pixel"/> |
|
||||||
<textField> |
|
||||||
<reportElement style="LegendLabel" x="0" y="30" width="818" height="20" uuid="b5c9a9db-b01b-48ab-9dca-3478eae8829e"/> |
|
||||||
<textElement verticalAlignment="Bottom"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<textFieldExpression><![CDATA["Filterkriterien: "]]></textFieldExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight"> |
|
||||||
<reportElement style="LegendContent" x="0" y="50" width="818" height="10" isPrintWhenDetailOverflows="true" backcolor="#FFFFFF" uuid="0d6743c3-cd7a-471f-baca-226acf0a9dbc"/> |
|
||||||
<box topPadding="10" leftPadding="2" bottomPadding="10" rightPadding="2"/> |
|
||||||
<textFieldExpression><![CDATA[""+(($F{legende_Seit Semester_value}==null || $F{legende_Seit Semester_value}=="")?"":($F{legende_Seit Semester_label}+": "+$F{legende_Seit Semester_value}+"; ")) |
|
||||||
+(($F{legende_Bis Semester_value}==null || $F{legende_Bis Semester_value}=="")?"":($F{legende_Bis Semester_label}+": "+$F{legende_Bis Semester_value}+"; ")) |
|
||||||
+(($F{legende_Semestertyp_value}==null || $F{legende_Semestertyp_value}=="")?"":($F{legende_Semestertyp_label}+": "+$F{legende_Semestertyp_value}+"; ")) |
|
||||||
+(($F{legende_Spaltenlayout_value}==null || $F{legende_Spaltenlayout_value}=="")?"":($F{legende_Spaltenlayout_label}+": "+$F{legende_Spaltenlayout_value}+"; ")) |
|
||||||
+"Datenstand: "+ $F{standdatum} + "; " + "Erstellt: "+ DATEFORMAT( TODAY(), "dd.MM.YYYY")]]></textFieldExpression> |
|
||||||
</textField> |
|
||||||
<textField> |
|
||||||
<reportElement x="0" y="0" width="818" height="30" uuid="cd4ea430-054a-4958-a410-35ce51cec7d5"> |
|
||||||
<propertyExpression name="net.sf.jasperreports.export.xls.sheet.name"><![CDATA[$F{Fach}+" "+$F{Abschluss}]]></propertyExpression> |
|
||||||
</reportElement> |
|
||||||
<textElement textAlignment="Left" verticalAlignment="Middle"> |
|
||||||
<font size="14" isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<textFieldExpression><![CDATA[$F{Fach}+" "+$F{Abschluss}]]></textFieldExpression> |
|
||||||
</textField> |
|
||||||
</band> |
|
||||||
</groupHeader> |
|
||||||
<groupFooter> |
|
||||||
<band height="55"> |
|
||||||
<staticText> |
|
||||||
<reportElement x="0" y="15" width="818" height="20" uuid="63ced6b8-8393-407e-aebf-76351478ff2c"> |
|
||||||
<property name="com.jaspersoft.studio.unit.y" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<text><![CDATA[* Bei weniger als 5 Prüfungsteilnehmern werden keine Durchschnittsnoten oder Durchfallquoten ausgewiesen.]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement x="0" y="35" width="818" height="20" uuid="30399079-73f3-4bf2-8a55-f7f313aab901"/> |
|
||||||
<text><![CDATA[Die Spalte "Nicht erschienen" dient zur ergänzenden Information, d.h. die hier angegebenen "Nicht erschienen" sind in den Spalten "Teilnehmer", "Durchschnittsnote" und "Durchfallquote in %" enthalten.]]></text> |
|
||||||
</staticText> |
|
||||||
</band> |
|
||||||
</groupFooter> |
|
||||||
</group> |
|
||||||
<group name="Semester"> |
|
||||||
<groupExpression><![CDATA[$F{Semester der Prüfung (Schlüssel)}]]></groupExpression> |
|
||||||
<groupHeader> |
|
||||||
<band height="45"> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="0" y="30" width="51" height="15" uuid="b2beb035-a6bc-40a4-844d-d9fe2f5891a4"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[pnr]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="435" y="30" width="128" height="15" uuid="b8f5202b-2d0a-427f-81de-c923cbe2f094"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Durchschnittsnote *]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="358" y="30" width="77" height="15" uuid="7e3c57b7-1ed1-470e-92a4-fe799dae0d9f"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Teilnehmer]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="691" y="30" width="127" height="15" uuid="c77831d1-4cc7-4401-aef8-585d8a64e7a9"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Nicht erschienen]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="51" y="30" width="307" height="15" uuid="1c8d7170-556e-4e09-a555-94f72f81509e"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Name der Prüfung]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="563" y="30" width="128" height="15" uuid="8cd3f230-31bf-4855-8009-22e8e5fcc20b"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Durchfallquote in % *]]></text> |
|
||||||
</staticText> |
|
||||||
<textField> |
|
||||||
<reportElement x="0" y="0" width="818" height="30" uuid="dde46984-9757-4065-970a-042ac9e725c4"/> |
|
||||||
<textElement textAlignment="Left" verticalAlignment="Middle"> |
|
||||||
<font size="14" isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<textFieldExpression><![CDATA["Prüfungen nach dem "+$F{Semester der Prüfung}]]></textFieldExpression> |
|
||||||
</textField> |
|
||||||
</band> |
|
||||||
</groupHeader> |
|
||||||
<groupFooter> |
|
||||||
<band height="50"/> |
|
||||||
</groupFooter> |
|
||||||
</group> |
|
||||||
<detail> |
|
||||||
<band height="15" splitType="Stretch"> |
|
||||||
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.spreadsheet.SpreadsheetLayout"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="0" y="0" width="51" height="15" uuid="ab1dcbe4-f124-430c-9831-e3a1aba7e82d"> |
|
||||||
<property name="com.jaspersoft.studio.unit.x" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Left" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{pnr}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA[]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="51" y="0" width="307" height="15" uuid="e0421889-bb9a-4324-bcf3-edc738d36828"> |
|
||||||
<property name="com.jaspersoft.studio.unit.x" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Left" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Name der Prüfung}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA[]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="358" y="0" width="77" height="15" uuid="6fcce53f-6e5b-43f5-bee1-74ca78fda172"/> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Right" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Teilnehmer}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA["#,##0"]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="435" y="0" width="128" height="15" uuid="74f016aa-b70a-44c5-97c7-4a2c458ad6d7"/> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Right" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Durchschnittsnote *}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA["#,##0.00;-#,##0.00"]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="563" y="0" width="128" height="15" uuid="e02a56f9-bdf2-4ca3-8933-73cded7631de"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Right" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Durchfallquote in % *}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA["#,##0.00;-#,##0.00"]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="691" y="0" width="127" height="15" uuid="39488aeb-b9b9-4656-8e15-f7f00b5f02ea"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Right" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Nicht erschienen}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA["#,##0"]]></patternExpression> |
|
||||||
</textField> |
|
||||||
</band> |
|
||||||
</detail> |
|
||||||
</jasperReport> |
|
@ -1,440 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<!-- Created with Jaspersoft Studio version 6.21.3.final using JasperReports Library version 6.21.3-4a3078d20785ebe464f18037d738d12fc98c13cf --> |
|
||||||
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="Leistungen und Studiengänge" language="groovy" pageWidth="969" pageHeight="5595" orientation="Landscape" columnWidth="945" leftMargin="12" rightMargin="12" topMargin="12" bottomMargin="12" uuid="d58082fe-8941-478b-b06e-8d7250737b92"> |
|
||||||
<property name="net.sf.jasperreports.export.xls.create.custom.palette" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.detect.cell.type" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.one.page.per.sheet" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.columns" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.remove.empty.space.between.rows " value="true"/> |
|
||||||
<property name="net.sf.jasperreports.print.create.bookmarks" value="true"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.1" value="pageHeader"/> |
|
||||||
<property name="net.sf.jasperreports.export.xls.exclude.origin.band.2" value="pageFooter"/> |
|
||||||
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.1" value="pageHeader"/> |
|
||||||
<property name="net.sf.jasperreports.export.xlsx.exclude.origin.band.2" value="pageFooter"/> |
|
||||||
<property name="com.jaspersoft.studio.data.defaultdataadapter" value="Prüfungsergebnisse"/> |
|
||||||
<template><![CDATA["simple_table.jrtx"]]></template> |
|
||||||
<style name="TableRowDetail" mode="Opaque" forecolor="#000000" backcolor="#FFFFFF" hTextAlign="Right" vTextAlign="Middle" isBlankWhenNull="true" fontName="Liberation Sans" fontSize="8" isBold="false"> |
|
||||||
<box rightPadding="2"> |
|
||||||
<pen lineColor="#000000"/> |
|
||||||
<topPen lineWidth="0.5" lineColor="#030303"/> |
|
||||||
<leftPen lineWidth="0.5" lineColor="#030303"/> |
|
||||||
<bottomPen lineWidth="0.5" lineColor="#030303"/> |
|
||||||
<rightPen lineWidth="0.5" lineColor="#030303"/> |
|
||||||
</box> |
|
||||||
<paragraph leftIndent="2" rightIndent="1" spacingBefore="0" spacingAfter="0"/> |
|
||||||
<conditionalStyle> |
|
||||||
<conditionExpression><![CDATA[Boolean.valueOf( $V{PAGE_COUNT} % 2 == 1 )]]></conditionExpression> |
|
||||||
<style mode="Opaque" forecolor="#000000" backcolor="#E3E8EB"/> |
|
||||||
</conditionalStyle> |
|
||||||
</style> |
|
||||||
<queryString language="xPath"> |
|
||||||
<![CDATA[/ergebnisse/ergebnis/ergebniselement[@ordnr='0']/sqlerg/row]]> |
|
||||||
</queryString> |
|
||||||
<field name="Berichtsname" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/maskenname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Erlaeuterung" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/explanation]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_HEADING_INSTITUTION" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_HEADING_INSTITUTION]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_HEADING_URL" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_HEADING_URL]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_LOGO_FILE" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_LOGO_FILE]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_HEADING_ADRESS" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_HEADING_ADRESS]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_EMAIL" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_EMAIL]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="REPORT_DOCUMENTATION_URL" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/generalinfo/REPORT_DOCUMENTATION_URL]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Fach" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="0" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Abschluss" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="1" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Semester der Prüfung (Schlüssel)" class="java.lang.Integer"> |
|
||||||
<fieldDescription><![CDATA[col[@id="2" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Semester der Prüfung" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="3" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="pnr" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="4" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Name der Prüfung" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="5" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Teilnehmer" class="java.lang.Integer"> |
|
||||||
<fieldDescription><![CDATA[col[@id="6" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Durchschnittsnote *" class="java.lang.Double"> |
|
||||||
<fieldDescription><![CDATA[col[@id="7" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Durchfallquote in % *" class="java.lang.Double"> |
|
||||||
<fieldDescription><![CDATA[col[@id="8" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Nicht erschienen" class="java.lang.Integer"> |
|
||||||
<fieldDescription><![CDATA[col[@id="9" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="Kurzkommentar" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[col[@id="10" and wert!=""]/wert]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Seit Semester_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Seit Semester"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Seit Semester_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Seit Semester"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_tablestylesheet_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="tablestylesheet"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_tablestylesheet_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="tablestylesheet"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Bis Semester_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Bis Semester"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Bis Semester_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Bis Semester"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Semestertyp_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Semestertyp"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Semestertyp_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Semestertyp"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Studiengang_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Studiengang"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Studiengang_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Studiengang"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Fächer_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Fächer"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Fächer_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Fächer"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Abschluss_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Abschluss"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Abschluss_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Abschluss"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_bis Fachsemester_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="bis Fachsemester"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_bis Fachsemester_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="bis Fachsemester"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Spaltenlayout_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Spaltenlayout"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Spaltenlayout_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Spaltenlayout"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Spalten_label" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/completefields/feld [@varname="Spalten"]/@varname]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="legende_Spalten_value" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="Spalten"]/value_caption]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="standdatum" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/stand]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<field name="user" class="java.lang.String"> |
|
||||||
<fieldDescription><![CDATA[/ergebnisse/user]]></fieldDescription> |
|
||||||
</field> |
|
||||||
<variable name="tabellennr" class="java.lang.Integer"> |
|
||||||
<variableExpression><![CDATA[0]]></variableExpression> |
|
||||||
</variable> |
|
||||||
<variable name="MinSemester" class="java.lang.Integer" resetType="Group" resetGroup="Abschluss" calculation="Lowest"> |
|
||||||
<variableExpression><![CDATA[$F{Semester der Prüfung (Schlüssel)}]]></variableExpression> |
|
||||||
</variable> |
|
||||||
<variable name="MaxSemester" class="java.lang.Integer" resetType="Group" resetGroup="Abschluss" calculation="Highest"> |
|
||||||
<variableExpression><![CDATA[$F{Semester der Prüfung (Schlüssel)}]]></variableExpression> |
|
||||||
</variable> |
|
||||||
<group name="tabellennr"> |
|
||||||
<groupExpression><![CDATA[$V{tabellennr}]]></groupExpression> |
|
||||||
</group> |
|
||||||
<group name="Fach"> |
|
||||||
<groupExpression><![CDATA[$F{Fach}]]></groupExpression> |
|
||||||
</group> |
|
||||||
<group name="Abschluss" isStartNewPage="true"> |
|
||||||
<groupExpression><![CDATA[$F{Abschluss}]]></groupExpression> |
|
||||||
<groupHeader> |
|
||||||
<band height="60"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="pixel"/> |
|
||||||
<textField> |
|
||||||
<reportElement style="LegendLabel" x="0" y="30" width="818" height="20" uuid="b5c9a9db-b01b-48ab-9dca-3478eae8829e"/> |
|
||||||
<textElement verticalAlignment="Bottom"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<textFieldExpression><![CDATA["Filterkriterien: "]]></textFieldExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight"> |
|
||||||
<reportElement style="LegendContent" x="0" y="50" width="818" height="10" isPrintWhenDetailOverflows="true" backcolor="#FFFFFF" uuid="0d6743c3-cd7a-471f-baca-226acf0a9dbc"/> |
|
||||||
<box topPadding="10" leftPadding="2" bottomPadding="10" rightPadding="2"/> |
|
||||||
<textFieldExpression><![CDATA[""+(($F{legende_Seit Semester_value}==null || $F{legende_Seit Semester_value}=="")?"":($F{legende_Seit Semester_label}+": "+$F{legende_Seit Semester_value}+"; ")) |
|
||||||
+(($F{legende_Bis Semester_value}==null || $F{legende_Bis Semester_value}=="")?"":($F{legende_Bis Semester_label}+": "+$F{legende_Bis Semester_value}+"; ")) |
|
||||||
+(($F{legende_Semestertyp_value}==null || $F{legende_Semestertyp_value}=="")?"":($F{legende_Semestertyp_label}+": "+$F{legende_Semestertyp_value}+"; ")) |
|
||||||
+(($F{legende_Spaltenlayout_value}==null || $F{legende_Spaltenlayout_value}=="")?"":($F{legende_Spaltenlayout_label}+": "+$F{legende_Spaltenlayout_value}+"; ")) |
|
||||||
+"Datenstand: "+ $F{standdatum} + "; " + "Erstellt: "+ DATEFORMAT( TODAY(), "dd.MM.YYYY")]]></textFieldExpression> |
|
||||||
</textField> |
|
||||||
<textField> |
|
||||||
<reportElement x="0" y="0" width="818" height="30" uuid="cd4ea430-054a-4958-a410-35ce51cec7d5"> |
|
||||||
<propertyExpression name="net.sf.jasperreports.export.xls.sheet.name"><![CDATA[$F{Fach}+" "+$F{Abschluss}]]></propertyExpression> |
|
||||||
</reportElement> |
|
||||||
<textElement textAlignment="Left" verticalAlignment="Middle"> |
|
||||||
<font size="14" isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<textFieldExpression><![CDATA[$F{Fach}+" "+$F{Abschluss}]]></textFieldExpression> |
|
||||||
</textField> |
|
||||||
</band> |
|
||||||
</groupHeader> |
|
||||||
<groupFooter> |
|
||||||
<band height="55"> |
|
||||||
<staticText> |
|
||||||
<reportElement x="0" y="15" width="818" height="20" uuid="63ced6b8-8393-407e-aebf-76351478ff2c"> |
|
||||||
<property name="com.jaspersoft.studio.unit.y" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<text><![CDATA[* Bei weniger als 5 Prüfungsteilnehmern werden keine Durchschnittsnoten oder Durchfallquoten ausgewiesen.]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement x="0" y="35" width="818" height="20" uuid="30399079-73f3-4bf2-8a55-f7f313aab901"/> |
|
||||||
<text><![CDATA[Die Spalte "Nicht erschienen" dient zur ergänzenden Information, d.h. die hier angegebenen "Nicht erschienen" sind in den Spalten "Teilnehmer", "Durchschnittsnote" und "Durchfallquote in %" enthalten.]]></text> |
|
||||||
</staticText> |
|
||||||
</band> |
|
||||||
</groupFooter> |
|
||||||
</group> |
|
||||||
<group name="Semester"> |
|
||||||
<groupExpression><![CDATA[$F{Semester der Prüfung (Schlüssel)}]]></groupExpression> |
|
||||||
<groupHeader> |
|
||||||
<band height="45"> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="0" y="30" width="51" height="15" uuid="b2beb035-a6bc-40a4-844d-d9fe2f5891a4"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[pnr]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="435" y="30" width="128" height="15" uuid="b8f5202b-2d0a-427f-81de-c923cbe2f094"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Durchschnittsnote *]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="358" y="30" width="77" height="15" uuid="7e3c57b7-1ed1-470e-92a4-fe799dae0d9f"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Teilnehmer]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="691" y="30" width="127" height="15" uuid="c77831d1-4cc7-4401-aef8-585d8a64e7a9"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Nicht erschienen]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="51" y="30" width="307" height="15" uuid="1c8d7170-556e-4e09-a555-94f72f81509e"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Name der Prüfung]]></text> |
|
||||||
</staticText> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="563" y="30" width="128" height="15" uuid="8cd3f230-31bf-4855-8009-22e8e5fcc20b"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Durchfallquote in % *]]></text> |
|
||||||
</staticText> |
|
||||||
<textField> |
|
||||||
<reportElement x="0" y="0" width="818" height="30" uuid="dde46984-9757-4065-970a-042ac9e725c4"/> |
|
||||||
<textElement textAlignment="Left" verticalAlignment="Middle"> |
|
||||||
<font size="14" isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<textFieldExpression><![CDATA["Prüfungen nach dem "+$F{Semester der Prüfung}]]></textFieldExpression> |
|
||||||
</textField> |
|
||||||
<staticText> |
|
||||||
<reportElement positionType="Float" x="818" y="30" width="127" height="15" uuid="9b520c01-969e-42e1-96fc-5ee84aefed46"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="1.0"/> |
|
||||||
<leftPen lineWidth="1.0"/> |
|
||||||
<bottomPen lineWidth="1.0"/> |
|
||||||
<rightPen lineWidth="1.0"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Center" verticalAlignment="Middle"> |
|
||||||
<font isBold="true"/> |
|
||||||
</textElement> |
|
||||||
<text><![CDATA[Kurzkommentar]]></text> |
|
||||||
</staticText> |
|
||||||
</band> |
|
||||||
</groupHeader> |
|
||||||
<groupFooter> |
|
||||||
<band height="50"/> |
|
||||||
</groupFooter> |
|
||||||
</group> |
|
||||||
<detail> |
|
||||||
<band height="15" splitType="Stretch"> |
|
||||||
<property name="com.jaspersoft.studio.layout" value="com.jaspersoft.studio.editor.layout.FreeLayout"/> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="0" y="0" width="51" height="15" uuid="ab1dcbe4-f124-430c-9831-e3a1aba7e82d"> |
|
||||||
<property name="com.jaspersoft.studio.unit.x" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Left" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{pnr}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA[]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="51" y="0" width="307" height="15" uuid="e0421889-bb9a-4324-bcf3-edc738d36828"> |
|
||||||
<property name="com.jaspersoft.studio.unit.x" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Left" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Name der Prüfung}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA[]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="358" y="0" width="77" height="15" uuid="6fcce53f-6e5b-43f5-bee1-74ca78fda172"/> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Right" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Teilnehmer}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA["#,##0"]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="435" y="0" width="128" height="15" uuid="74f016aa-b70a-44c5-97c7-4a2c458ad6d7"/> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Right" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Durchschnittsnote *}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA["#,##0.00;-#,##0.00"]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="563" y="0" width="128" height="15" uuid="e02a56f9-bdf2-4ca3-8933-73cded7631de"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Right" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Durchfallquote in % *}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA["#,##0.00;-#,##0.00"]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="691" y="0" width="127" height="15" uuid="39488aeb-b9b9-4656-8e15-f7f00b5f02ea"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Right" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Nicht erschienen}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA["#,##0"]]></patternExpression> |
|
||||||
</textField> |
|
||||||
<textField textAdjust="StretchHeight" isBlankWhenNull="true"> |
|
||||||
<reportElement stretchType="ContainerHeight" x="818" y="0" width="127" height="15" uuid="cc427426-27cb-47da-b300-1f472fcd9cd1"> |
|
||||||
<property name="com.jaspersoft.studio.unit.height" value="px"/> |
|
||||||
</reportElement> |
|
||||||
<box> |
|
||||||
<topPen lineWidth="0.5"/> |
|
||||||
<leftPen lineWidth="0.5"/> |
|
||||||
<bottomPen lineWidth="0.5"/> |
|
||||||
<rightPen lineWidth="0.5"/> |
|
||||||
</box> |
|
||||||
<textElement textAlignment="Right" verticalAlignment="Middle"/> |
|
||||||
<textFieldExpression><![CDATA[$F{Kurzkommentar}]]></textFieldExpression> |
|
||||||
<patternExpression><![CDATA["#,##0"]]></patternExpression> |
|
||||||
</textField> |
|
||||||
</band> |
|
||||||
</detail> |
|
||||||
</jasperReport> |
|
@ -1,16 +0,0 @@ |
|||||||
<td align="left"> |
|
||||||
<div id="fld_column_id"> |
|
||||||
<input onblur="updateSelect(this)" style="display:none" size="10" name="key_rpta_column2layoutcolumn_id" class="schluesselfeld" type="text"> |
|
||||||
<db:select id="inp_rpta_column2layoutcolumn_id" styleClass="clsInputStyle" readOnly="false" onChange="updateKeyfield(this)" fieldName="column_id" customEntry=",,true"><% |
|
||||||
sql = "select C.tid, coalesce(C.caption,'Unbenannt') || ' (' || coalesce(C.uniquename,'TID: ' || C.tid::varchar) || ') [' || T.caption || ']' from rpta_column C, rpta_column_type T"; |
|
||||||
sql +=" where C.column_type=T.tid "; |
|
||||||
if(currentRow_rpta_column_layout != null && currentRow_rpta_column_layout.get("resultset_id") != null |
|
||||||
&& !currentRow_rpta_column_layout.get("resultset_id").toString().equals("")) |
|
||||||
{ |
|
||||||
sql +=" and C.resultset_id= "+currentRow_rpta_column_layout.get("resultset_id").toString(); |
|
||||||
} |
|
||||||
sql +=" order by 1;"; |
|
||||||
|
|
||||||
%><db:queryData name="rpta_column2layout_rpta_column7" query="<%= sql %>" dbConnectionName="<%= mandantenid %>" /> </db:select> |
|
||||||
</div> |
|
||||||
</td> |
|
@ -1,320 +0,0 @@ |
|||||||
<?xml version="1.0" encoding="UTF-8"?> |
|
||||||
<xsl:stylesheet version="1.0" |
|
||||||
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|
||||||
<xsl:import href="pageComponents_html.xsl" /> |
|
||||||
<!--In diesem Stylesheet können Sie individuelle templates unterbringen, |
|
||||||
die in ihrer Präzedenz das normale Stylesheet |
|
||||||
pageComponents_html.xsl überragt. --> |
|
||||||
<xsl:import href="pageComponents_html_final.xsl" /> |
|
||||||
<xsl:import href="resultset_html.xsl" /> |
|
||||||
<xsl:import href="interLinks_html.xsl" /> |
|
||||||
<xsl:decimal-format name="German" grouping-separator="." NaN="" zero-digit ="0" decimal-separator="," /> |
|
||||||
|
|
||||||
<xml:output method="application/vnd.ms-excel" /> |
|
||||||
<xsl:template match="/"> |
|
||||||
<xsl:call-template name="xlsworkbook"/> |
|
||||||
</xsl:template> |
|
||||||
<xsl:template name="xlsworkbook"> |
|
||||||
<xls_workbook vorlage=""> |
|
||||||
|
|
||||||
<!-- define the xl styles--> |
|
||||||
<xsl:call-template name="xls_Styles" /> |
|
||||||
<!--Seitenformat--> |
|
||||||
<xsl:call-template name="xls_PageFormat" /> |
|
||||||
<!-- define the xl data for the first sheet --> |
|
||||||
<xsl:for-each select="ergebnisse/ergebnis/ergebniselement"> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="@typ='image'"> |
|
||||||
<xsl:text> |
|
||||||
|
|
||||||
</xsl:text> |
|
||||||
</xsl:when> |
|
||||||
<xsl:when test="@typ='tabelle'"> |
|
||||||
|
|
||||||
<xsl:call-template name="xslsheet"/> |
|
||||||
|
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
</xsl:for-each> |
|
||||||
|
|
||||||
</xls_workbook> |
|
||||||
</xsl:template> |
|
||||||
|
|
||||||
<xsl:template name="xslsheet"> |
|
||||||
<xls_sheet name="{substring-after(substring-after(../felder/feld[ @varname='Studiengang']/value,'_'),'_')}"> |
|
||||||
|
|
||||||
<xls_row height="600"> |
|
||||||
<xls_cell style="maskenname" width="10000"><xsl:value-of select="../maskenname" /></xls_cell> |
|
||||||
</xls_row> |
|
||||||
|
|
||||||
|
|
||||||
<xsl:call-template name="legende_xl"> </xsl:call-template> |
|
||||||
<xls_row height="1000"><xls_cell></xls_cell></xls_row> |
|
||||||
|
|
||||||
<xsl:call-template name="xlsheader"/> |
|
||||||
|
|
||||||
<xsl:call-template name="xslrows"/> |
|
||||||
</xls_sheet> |
|
||||||
</xsl:template> |
|
||||||
|
|
||||||
<xsl:template name="xslrows"> |
|
||||||
<xsl:for-each select="sqlerg/row"> |
|
||||||
<xsl:call-template name="xslsinglerow"/> |
|
||||||
</xsl:for-each> |
|
||||||
</xsl:template> |
|
||||||
|
|
||||||
|
|
||||||
<xsl:template name="xslsinglerow"> |
|
||||||
<xsl:variable name="erglevelmax"> |
|
||||||
<xsl:if test="count(../../sqlerg/row/col [ f_name = 'ebene' ]) > 0"> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="count(../../sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '4']) > 0"> |
|
||||||
<xsl:text>4</xsl:text> |
|
||||||
</xsl:when> |
|
||||||
<xsl:when test="count(../../sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '3']) > 0"> |
|
||||||
<xsl:text>3</xsl:text> |
|
||||||
</xsl:when> |
|
||||||
<xsl:when test="count(../../sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '2']) > 0"> |
|
||||||
<xsl:text>2</xsl:text> |
|
||||||
</xsl:when> |
|
||||||
<xsl:when test="count(../../sqlerg/row/col [ f_name = 'ebene' ] /wert [ . = '1']) > 0"> |
|
||||||
<xsl:text>1</xsl:text> |
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
<xsl:text>5</xsl:text> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
</xsl:if> |
|
||||||
</xsl:variable> |
|
||||||
<!--Hinweis: Wenn für die row eine Ebene angegeben ist, wird die Darstellung vom Server definiert |
|
||||||
Style der Zelle (z.B. body_dec) wird ignoriert, Attribut numeric ist wichtig für Darstellung, |
|
||||||
per datatype decimal wird Nachkommastellenanzeige eingestellt--> |
|
||||||
<xls_row> |
|
||||||
<!-- DQ 14.12.07 In Zukunft noch erglevelmax auswerten when$erglevelmax = 5 and --> |
|
||||||
<xsl:if test="count(col[ f_name = 'ebene' ]) > 0"> |
|
||||||
<xsl:attribute name="ebene"><xsl:value-of select="6-$erglevelmax+number(col[ f_name = 'ebene' ]/wert)" /></xsl:attribute> |
|
||||||
</xsl:if> |
|
||||||
<xsl:if test="@issumme='true'"> |
|
||||||
<xsl:attribute name="ebene"><xsl:value-of select="'summe'" /></xsl:attribute> |
|
||||||
</xsl:if> |
|
||||||
<!--MB keine Zelle für Linkspalten, 4/2010 keine versteckten Spalten--> |
|
||||||
<xsl:for-each select="col[(starts-with(f_name,'hidden'))=false and starts-with(f_name,'next') = false ]"> |
|
||||||
<xls_cell> |
|
||||||
|
|
||||||
<xsl:variable name="checkname"><xsl:value-of select="concat('hidden',f_name,'dp')"/></xsl:variable> |
|
||||||
<xsl:choose> <!--MB wenn es eine versteckte hidden_decimalpl gibt auswerten--> |
|
||||||
|
|
||||||
<!--MB 4/2010 wenn decimalzahl aber decimalplaces=0 als nicht als decimal sondern integer ausgeben s.u. --> |
|
||||||
<!-- typ 8 timestamp nicht als Decimalzahl sondern Text ausgeben --> |
|
||||||
<xsl:when test="(@typ='2' or @typ='3') and count(../col[f_name=$checkname]) = 0"> <!-- DecimalFormat --> |
|
||||||
<xsl:attribute name="style">body_dec</xsl:attribute> |
|
||||||
<xsl:attribute name="numeric">true</xsl:attribute> |
|
||||||
<xsl:attribute name="datatype">decimal</xsl:attribute> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="wert != ''"> |
|
||||||
<xsl:value-of select="wert" /> |
|
||||||
<!--<xsl:value-of select="format-number(wert,'###.###.###.###.##0,00','German')" />--> |
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
<xsl:value-of select="' '" /> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
</xsl:when> |
|
||||||
<xsl:when test="(@typ='2' or @typ='3') and count(../col[f_name=$checkname]) >0 and ../col[f_name=$checkname]/wert!='0'"> <!-- DecimalFormat --> |
|
||||||
<xsl:attribute name="style">body_dec</xsl:attribute> <!-- row.ebene überlagert ggfs! --> |
|
||||||
<xsl:attribute name="numeric">true</xsl:attribute> |
|
||||||
<xsl:attribute name="datatype">decimal</xsl:attribute> |
|
||||||
<!--<xsl:value-of select="wert" />--> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="wert != ''"> |
|
||||||
<xsl:value-of select="wert" /> |
|
||||||
<!--<xsl:value-of select="format-number(wert,'###.###.###.###.##0,00','German')" />--> |
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
<xsl:value-of select="' '" /> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
|
|
||||||
</xsl:when> |
|
||||||
|
|
||||||
<xsl:when test="../col[f_name=$checkname]/wert='0' or @typ='4' or @typ='5'"> <!-- MB: Integer/ auch typ 5 Smallint --> |
|
||||||
<xsl:attribute name="style">body_int</xsl:attribute> <!-- row.ebene überlagert ggfs! --> |
|
||||||
<xsl:attribute name= "numeric">true</xsl:attribute> |
|
||||||
<xsl:attribute name="datatype">integer</xsl:attribute> |
|
||||||
<!--<xsl:value-of select="wert" />--> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="wert != ''"> |
|
||||||
<!-- MB formatierung format-number(wert,'###.###.###.###.###','German') raus, macht Excel selbst --> |
|
||||||
<xsl:value-of select="wert " /> |
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
<xsl:value-of select="' '" /> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
|
|
||||||
</xsl:when> |
|
||||||
<!-- deutsche datumsfelder können von POI noch nicht richtig verarbeitet werden |
|
||||||
<xsl:when test="@typ='91'"> |
|
||||||
<xsl:attribute name="style">body_date</xsl:attribute> |
|
||||||
<xsl:attribute name="datatype">date</xsl:attribute> |
|
||||||
<xsl:value-of select="wert " /> |
|
||||||
</xsl:when> |
|
||||||
--> |
|
||||||
<xsl:otherwise> |
|
||||||
<!--Typ=1 ist string und wird defaultmäßig behandelt --> |
|
||||||
<xsl:attribute name="style">body</xsl:attribute> <!-- row.ebene überlagert ggfs! --> |
|
||||||
<xsl:call-template name="field_type" /> |
|
||||||
<!-- MB 8/2015 da next... eh nicht angezeigt werden kann auf resultsetLink verzichtet werden, |
|
||||||
so kommen bei Usern die emailadressen als reiner text raus |
|
||||||
|
|
||||||
<xsl:variable name="zs"> |
|
||||||
<xsl:call-template name="field_value"> |
|
||||||
</xsl:call-template> |
|
||||||
</xsl:variable> |
|
||||||
<xsl:call-template name="resultsetLink"> |
|
||||||
<xsl:with-param name="zs2" select="$zs" /> |
|
||||||
</xsl:call-template> |
|
||||||
--> |
|
||||||
<xsl:call-template name="field_value"/> |
|
||||||
<!-- MB 5.5.08 ablegen in zs3 und aufruf von get_val_or_nbsp nicht nötig--> |
|
||||||
|
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
|
|
||||||
</xls_cell> |
|
||||||
|
|
||||||
</xsl:for-each><!--cell--> |
|
||||||
|
|
||||||
</xls_row> |
|
||||||
</xsl:template> |
|
||||||
|
|
||||||
<xsl:template name="xlsheader"> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="/ergebnisse/ergebnis/ergebniselement/sqlerg/headers/@hasAggregationHeaders='true'"> |
|
||||||
<xsl:variable name="nr_rows"><xsl:value-of select="count(sqlerg/aggregationHeaders/tr)" /></xsl:variable> |
|
||||||
<xsl:for-each select="sqlerg/aggregationHeaders/tr"> |
|
||||||
<!-- AK 20.08.2014 Der Header bekommt eine höhere Zeile--> |
|
||||||
<xls_row height="600"> |
|
||||||
<xsl:if test="position()=1"> |
|
||||||
<xsl:attribute name="repeating"><xsl:value-of select="$nr_rows" /></xsl:attribute> |
|
||||||
</xsl:if> |
|
||||||
<xsl:for-each select="th"> |
|
||||||
<xsl:if test="starts-with(@f_name,'next') = false and starts-with(@f_name,'hidden') = false"> |
|
||||||
<xls_cell style="heading"> |
|
||||||
<xsl:attribute name="width"><xsl:value-of select="@width * 280" /> </xsl:attribute> |
|
||||||
<xsl:if test="@colspan != ''"> |
|
||||||
<xsl:attribute name="colspan"><xsl:value-of select="@colspan" /> </xsl:attribute> |
|
||||||
</xsl:if> |
|
||||||
<xsl:if test="@rowspan != ''"> |
|
||||||
<xsl:attribute name="rowspan"><xsl:value-of select="@rowspan" /> </xsl:attribute> |
|
||||||
</xsl:if> |
|
||||||
<xsl:call-template name="removeBackslashN" > |
|
||||||
<xsl:with-param name="derwert"><xsl:value-of select="." /></xsl:with-param> |
|
||||||
<xsl:with-param name="format"><xsl:value-of select="'xls'" /></xsl:with-param> |
|
||||||
</xsl:call-template> |
|
||||||
</xls_cell> |
|
||||||
</xsl:if> |
|
||||||
</xsl:for-each> |
|
||||||
</xls_row> |
|
||||||
</xsl:for-each> |
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
<!-- alt Normale headers --> |
|
||||||
<xls_row repeating="true"> |
|
||||||
<!--MB 04/2010 versteckte Spalten nicht kein Header für Linkspalten--> --> |
|
||||||
<xsl:for-each select="sqlerg/headers/header[(starts-with(f_name,'hidden'))=false and starts-with(f_name,'next') = false ]"> |
|
||||||
<xsl:call-template name="xlssingleheader"> |
|
||||||
<xsl:with-param name="derwert" select="wert" /> |
|
||||||
</xsl:call-template> |
|
||||||
</xsl:for-each> |
|
||||||
</xls_row> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
</xsl:template> |
|
||||||
<xsl:template name="xlssingleheader"> |
|
||||||
<xsl:param name="derwert" /> |
|
||||||
<xls_cell style="heading"> |
|
||||||
<xsl:attribute name="width"><xsl:value-of select="@width * 280" /> </xsl:attribute> |
|
||||||
<!--max. 2 Umbrüche pro Zelle --> |
|
||||||
<!--<xsl:value-of select="string($derwert) "/>--> |
|
||||||
|
|
||||||
<xsl:variable name="header1"> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="(contains(string($derwert),'\n'))"> |
|
||||||
<xsl:value-of select="substring-before($derwert,'\n') "/> |
|
||||||
<xsl:text> |
|
||||||
</xsl:text> |
|
||||||
<xsl:value-of select="substring-after($derwert,'\n') "/> |
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
<xsl:copy-of select="$derwert" /> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
</xsl:variable> |
|
||||||
<xsl:variable name="header2"> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="(contains(string($header1),'\n'))"> |
|
||||||
<xsl:value-of select="substring-before($header1,'\n') "/> |
|
||||||
<xsl:text> |
|
||||||
</xsl:text> |
|
||||||
<xsl:value-of select="substring-after($header1,'\n') "/> |
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
<xsl:value-of select="$header1" /> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
</xsl:variable> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="(contains(string($header2),'\000'))"> |
|
||||||
<xsl:value-of select="substring-before($header2,'\000') "/> |
|
||||||
<xsl:text> |
|
||||||
</xsl:text> |
|
||||||
<xsl:value-of select="substring-after($header2,'\000') "/> |
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
<xsl:value-of select="$header2" /> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose> |
|
||||||
|
|
||||||
</xls_cell> |
|
||||||
</xsl:template> |
|
||||||
<xsl:template name="legende_xl"> |
|
||||||
<xls_row height="1000"> |
|
||||||
<xls_cell style="legende"> |
|
||||||
<xsl:for-each select="../felder/feld"> |
|
||||||
<xsl:if test="(value !='' or sicht/@isFirstInGroup='false' or @isstandtoday='false') and @varname != 'sort' and @varname != 'maxoffset' and @varname!='##line##' "> |
|
||||||
<xsl:choose> |
|
||||||
<xsl:when test="string-length(caption_short) > 0 and caption_short != 'null'" > |
|
||||||
<![CDATA[]]><xsl:value-of select="normalize-space(string(caption_short))" /><![CDATA[]]> |
|
||||||
</xsl:when> |
|
||||||
<xsl:otherwise> |
|
||||||
<![CDATA[]]><xsl:value-of select="normalize-space(string(@varname))" /><![CDATA[]]> |
|
||||||
</xsl:otherwise> |
|
||||||
</xsl:choose><xsl:text>: </xsl:text> |
|
||||||
<![CDATA[]]><xsl:value-of select="normalize-space(string(value_caption))" /><![CDATA[]]> |
|
||||||
<!-- bei Mehrfachauswahl keine Einschränkung auf 50 Zeichen sinnvoll |
|
||||||
<xsl:if test="string-length(wert/caption) < 50"> |
|
||||||
<![CDATA[]]><xsl:value-of select="normalize-space(string(value_caption))" /><![CDATA[]]> |
|
||||||
</xsl:if> |
|
||||||
<xsl:if test="string-length(wert/caption) > 49"> |
|
||||||
<![CDATA[]]><xsl:value-of select="substring(value_caption,0,50)" /><![CDATA[]]><xsl:text>...</xsl:text> |
|
||||||
</xsl:if>--> |
|
||||||
<xsl:if test="sicht!=''"> |
|
||||||
<![CDATA[]]><xsl:text> (</xsl:text><xsl:value-of select="sicht" /> |
|
||||||
<xsl:if test="@stand!=''"><xsl:text> - Stand:</xsl:text><xsl:value-of select="@stand"/></xsl:if> |
|
||||||
<xsl:text>)</xsl:text><![CDATA[]]> |
|
||||||
</xsl:if> |
|
||||||
<xsl:text>; </xsl:text> |
|
||||||
</xsl:if> |
|
||||||
</xsl:for-each> |
|
||||||
<xsl:text>User: </xsl:text><xsl:value-of select="/ergebnisse/user" /> |
|
||||||
<xsl:text>; Stand: </xsl:text><xsl:value-of select="../stand" /> |
|
||||||
</xls_cell> |
|
||||||
</xls_row> |
|
||||||
<xsl:if test="../hinweis!=''"> |
|
||||||
<xls_row height="1000"><xls_cell style="legende"><xsl:value-of select="../hinweis"/></xls_cell></xls_row> |
|
||||||
</xsl:if> |
|
||||||
</xsl:template> |
|
||||||
</xsl:stylesheet> |
|
Loading…
Reference in new issue