10 changed files with 180 additions and 18 deletions
@ -0,0 +1,16 @@ |
|||||||
|
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^ ^^ |
@ -0,0 +1 @@ |
|||||||
|
48150^330^ |
@ -0,0 +1,10 @@ |
|||||||
|
48150^48150^ |
||||||
|
48150^48151^ |
||||||
|
48150^48152^ |
||||||
|
48150^48153^ |
||||||
|
48150^48154^ |
||||||
|
48150^48155^ |
||||||
|
48150^48156^ |
||||||
|
48150^48157^ |
||||||
|
48150^48158^ |
||||||
|
48150^48159^ |
@ -0,0 +1,122 @@ |
|||||||
|
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^ ^ |
@ -0,0 +1 @@ |
|||||||
|
331^48150^ |
@ -0,0 +1,16 @@ |
|||||||
|
<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> |
Loading…
Reference in new issue