10 changed files with 308 additions and 5 deletions
@ -0,0 +1,29 @@ |
|||||||
|
44600^Spaltenlayout^3000^350^-1^140^180^1^char^30^1^1^<<SQL>>SELECT uniquename,\ |
||||||
|
caption\ |
||||||
|
FROM rpta_column_layout \ |
||||||
|
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat')\ |
||||||
|
and R.systeminfo_id=7)\ |
||||||
|
and uniquename in ('sos_stud_hzb_bland')\ |
||||||
|
order by sortnr, caption\ |
||||||
|
;^^<<SQL>>SELECT uniquename,\ |
||||||
|
caption\ |
||||||
|
FROM rpta_column_layout \ |
||||||
|
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename in ('sos_stud_astat')\ |
||||||
|
and R.systeminfo_id=7)\ |
||||||
|
and uniquename in ('sos_stud_hzb_bland')\ |
||||||
|
order by sortnr, caption limit 1\ |
||||||
|
;^ |
||||||
|
44601^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;^ |
||||||
|
44602^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;^ ^ ^ |
||||||
|
44603^Abschluss^40^0^0^100^200^3^char^1500^0^1^<<SQL>> select apnr, druck from cifx where key=35 order by 2;^ ^ ^ |
||||||
|
44604^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^13^^ ^ ^ |
||||||
|
44605^Grafik^4000^300^-1^170^150^1^char^30^0^1^<<SQL>> select uniquename, caption from viz_chart where maskeninfo_id=44280 order by 2;^^<<SQL>> select uniquename, caption from viz_chart where maskeninfo_id=44280 order by 2 limit 1;^ |
||||||
|
44606^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^1^hs_zugangsber^apnr, eintrag^ ^ |
||||||
|
44607^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;^ |
||||||
|
44608^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;^ ^ ^ |
||||||
|
44609^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;^ ^ ^ |
||||||
|
44610^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=44600 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=44600 order by ord limit 1^ |
||||||
|
44611^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';^ |
||||||
|
44612^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';^ |
||||||
|
44618^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';^ |
||||||
|
44622^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,15 @@ |
|||||||
|
44600^44600^ |
||||||
|
44600^44601^ |
||||||
|
44600^44602^ |
||||||
|
44600^44603^ |
||||||
|
44600^44604^ |
||||||
|
44600^44605^ |
||||||
|
44600^44606^ |
||||||
|
44600^44607^ |
||||||
|
44600^44608^ |
||||||
|
44600^44609^ |
||||||
|
44600^44610^ |
||||||
|
44600^44611^ |
||||||
|
44600^44612^ |
||||||
|
44600^44618^ |
||||||
|
44600^44622^ |
@ -0,0 +1 @@ |
|||||||
|
44600^Studierende nach Region^<sximport>select select_stmt from maskeninfo where tid=45000</sximport>^<sximport>select xil_proplist from maskeninfo where tid=45000</sximport>^Studienfach^Anzahl bzw. Anteil^Ausgabe der Studierenden nach Landkreis/Bundesland^<sximport>select cleanup_stmt from maskeninfo where tid=45000</sximport>^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^ |
@ -0,0 +1 @@ |
|||||||
|
16^44600^ |
@ -0,0 +1,246 @@ |
|||||||
|
--freemarker template |
||||||
|
<sqlvars> |
||||||
|
<sqlvar name="rpta_installed"> |
||||||
|
select count(*) from systeminfo where tid=330; |
||||||
|
</sqlvar> |
||||||
|
</sqlvars> |
||||||
|
<#assign rpta_column_layout = |
||||||
|
{"uniquename":"sos_stud_hzb_bland", |
||||||
|
"caption":"Studierende nach HZB-Bundesland", |
||||||
|
"rpta_resultset":"sos_stud_astat", |
||||||
|
"whereclause":"", |
||||||
|
"description":"Studierende nach HZB-Bundesland" |
||||||
|
} |
||||||
|
/> |
||||||
|
|
||||||
|
<#assign rpta_columns = [ |
||||||
|
{"uniquename":"hzb_bland", |
||||||
|
"caption":"Bundesland (HZB)", |
||||||
|
"srcfieldname":"", |
||||||
|
"targetfieldname":"hzb_bland", |
||||||
|
"column_type":"lookupColumn", |
||||||
|
"col_function":"select B.druck from sos_hzb_wohnsitz W, sos_k_bland B where W.bland=B.apnr and W.astat=hzbkfz", |
||||||
|
"is_visible":"1", |
||||||
|
"format_code":"", |
||||||
|
"visible_size":"5", |
||||||
|
"is_aggregate":"0", |
||||||
|
"description":"Bundesland (HZB)" |
||||||
|
}, |
||||||
|
{"uniquename":"summe", |
||||||
|
"caption":"Anzahl der Studierenden", |
||||||
|
"srcfieldname":"summe", |
||||||
|
"column_type":"physicalColumn", |
||||||
|
"col_function":"sum", |
||||||
|
"is_visible":"1", |
||||||
|
"visible_size":"5", |
||||||
|
"is_aggregate":"1", |
||||||
|
"description":"Summe der Studierenden" |
||||||
|
} |
||||||
|
] |
||||||
|
/> |
||||||
|
|
||||||
|
<#if rpta_installed==1> |
||||||
|
---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; |
||||||
|
drop TABLE tmp_rpta_column2layout; |
||||||
|
</#if> |
Loading…
Reference in new issue