Browse Source

Neue Spalte anlegen nicht am Ende der Liste, sondern als eigene Maske #8

master
Daniel Quathamer 1 week ago
parent
commit
f5acbf1a6f
  1. 1
      src-modules/module/rpta/conf/includes.txt
  2. 13
      src-modules/module/rpta/conf/rpta.xml
  3. 17
      src-modules/module/rpta/masken/48040_maskeninfo.unl
  4. 16
      src-modules/module/rpta/masken/48150_felderinfo.unl
  5. 1
      src-modules/module/rpta/masken/48150_maske_system_bez.unl
  6. 10
      src-modules/module/rpta/masken/48150_masken_felder_bez.unl
  7. 122
      src-modules/module/rpta/masken/48150_maskeninfo.unl
  8. 1
      src-modules/module/rpta/masken/48150_sachgeb_maske_bez.unl
  9. 1
      src-modules/module/rpta/upgrade/rpta_upgrade_man.sql
  10. 16
      superx/edit/rpta/rpta_column_layout_add_column.inc

1
src-modules/module/rpta/conf/includes.txt

@ -1,3 +1,4 @@
edit/rpta/rpta_column_layout_add_column.inc
doku/rpta_modul/rpta.html doku/rpta_modul/rpta.html
WEB-INF/conf/edustore/db/bin/SQL_ENV_rpta.sam WEB-INF/conf/edustore/db/bin/SQL_ENV_rpta.sam
images/icons/file-excel_rpta.svg images/icons/file-excel_rpta.svg

13
src-modules/module/rpta/conf/rpta.xml

@ -153,7 +153,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
<column name="column_id" type="INTEGER" size="255" default="" notnull="" description="Spalte" /> <column name="column_id" type="INTEGER" size="255" default="" notnull="" description="Spalte" />
<column name="layout_id" type="INTEGER" size="255" default="" notnull="" description="Layout" isKey="true" /> <column name="layout_id" type="INTEGER" size="255" default="" notnull="" description="Layout" isKey="true" />
<column name="sortnr" type="SMALLINT" size="2" default="" notnull="" description="Sortiernr." sortable="true"/> <column name="sortnr" type="SMALLINT" size="2" default="" notnull="" description="Sortiernr." sortable="true"/>
<column name="is_visible" type="SMALLINT" size="2" default="" notnull="" description="Sichtbare Spalte" ></column> <column name="is_visible" type="SMALLINT" size="2" default="1" notnull="" description="Sichtbare Spalte" ></column>
<column name="visible_size" type="SMALLINT" size="2" default="" notnull="" description="Breite in Zeichen" ><comment>Bei String-Spalten</comment></column> <column name="visible_size" type="SMALLINT" size="2" default="" notnull="" description="Breite in Zeichen" ><comment>Bei String-Spalten</comment></column>
<column name="format_code_id" type="INTEGER" size="255" default="" notnull="" description="Format-Code" ><comment>Bei DECIMAL- und Datumsspalten</comment></column> <column name="format_code_id" type="INTEGER" size="255" default="" notnull="" description="Format-Code" ><comment>Bei DECIMAL- und Datumsspalten</comment></column>
<column name="targetfieldname" type="VARCHAR" size="255" default="" notnull="" description="Zielfeld" currentlyUsed="false" /> <column name="targetfieldname" type="VARCHAR" size="255" default="" notnull="" description="Zielfeld" currentlyUsed="false" />
@ -330,7 +330,14 @@ parent="Berichtsassistent">Abfragen zur Administration von Berichtsassistent </t
<path>$RPTA_PFAD/masken</path> <path>$RPTA_PFAD/masken</path>
</src> </src>
</maske> </maske>
<!--<maske tid="48140" name="Leistungen und Studiengänge (Makro)" thema="Berichtsassistent"> <maske tid="48150" name="Spalten anlegen" thema="Administration Berichtsassistent">
<description>Spalten erzeugen</description>
<src>
<path>$RPTA_PFAD/masken</path>
</src>
</maske>
<!--<maske tid="48140" name="Leistungen und Studiengänge (Makro)" thema="Berichtsassistent">
<description>Leistungen und Studiengänge</description> <description>Leistungen und Studiengänge</description>
<src> <src>
<path>$RPTA_PFAD/masken</path> <path>$RPTA_PFAD/masken</path>
@ -618,7 +625,7 @@ mode="full">
mode="full"> mode="full">
<field-selection complete="false" /> <field-selection complete="false" />
<customfield name="layout_id" type="hidden" overrideValue="tid" /> <customfield name="layout_id" type="hidden" overrideValue="tid" />
<customfield name="column_id" nullFieldValue="" visibleSize="5" /> <customfield name="column_id" type="include" path="/edit/rpta/rpta_column_layout_add_column.inc"/>
<customfield name="sortnr" nullFieldValue="" visibleSize="10" /> <customfield name="sortnr" nullFieldValue="" visibleSize="10" />
<customfield type="link" name="Details" path="/superx/edit/rpta/rpta_column2layout_edit.jsp" <customfield type="link" name="Details" path="/superx/edit/rpta/rpta_column2layout_edit.jsp"
linkVar="tid" linkid="tid" mandatoryFilter="" mandatoryFilterVar=""/> linkVar="tid" linkid="tid" mandatoryFilter="" mandatoryFilterVar=""/>

17
src-modules/module/rpta/masken/48040_maskeninfo.unl

@ -60,21 +60,8 @@ update tmp_rpta_column set resultset_str=R.caption\
from rpta_resultset R\ from rpta_resultset R\
where R.tid=tmp_rpta_column.resultset_id;\ where R.tid=tmp_rpta_column.resultset_id;\
\ \
\\
\ \
\
insert into tmp_rpta_column (ord,\
caption, \
nextedit) \
select 10, --ord\
'Neuer Eintrag',\
nvl(('../edit/qa/rpta_column_edit.jsp|tid=' || max(tid)+1)::varchar(255),'../edit/qa/rpta_column_edit.jsp'::varchar(255))\
from rpta_column\
;\
\
\
\
\
\
select \ select \
caption,\ caption,\
uniquename,\ uniquename,\
@ -118,4 +105,4 @@ Column CID=1 heading_text="Individuelle Spalte" center_heading\
Column CID=1 heading_text="Bearbeiten" center_heading\ Column CID=1 heading_text="Bearbeiten" center_heading\
row_selectable col_selectable heading_platform readonly\ row_selectable col_selectable heading_platform readonly\
width=5 text_size=200\ width=5 text_size=200\
@@@^^^Spaltendefinitionen und deren Zuordnung zu Berichten verwalten.^drop table tmp_rpta_column;^^1^440^360^0^1^^ @@@^^^Spaltendefinitionen und deren Zuordnung zu Berichten verwalten.^drop table tmp_rpta_column;^^1^440^360^0^1^ ^

16
src-modules/module/rpta/masken/48150_felderinfo.unl

@ -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^ ^^

1
src-modules/module/rpta/masken/48150_maske_system_bez.unl

@ -0,0 +1 @@
48150^330^

10
src-modules/module/rpta/masken/48150_masken_felder_bez.unl

@ -0,0 +1,10 @@
48150^48150^
48150^48151^
48150^48152^
48150^48153^
48150^48154^
48150^48155^
48150^48156^
48150^48157^
48150^48158^
48150^48159^

122
src-modules/module/rpta/masken/48150_maskeninfo.unl

@ -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^ ^

1
src-modules/module/rpta/masken/48150_sachgeb_maske_bez.unl

@ -0,0 +1 @@
331^48150^

1
src-modules/module/rpta/upgrade/rpta_upgrade_man.sql

@ -29,6 +29,7 @@ drop table tmp_delete_mask;
alter table rpta_resultset alter column fieldclause type text; alter table rpta_resultset alter column fieldclause type text;
alter table rpta_resultset alter column joinclause type text; alter table rpta_resultset alter column joinclause type text;
alter table rpta_resultset alter column whereclause type text; alter table rpta_resultset alter column whereclause type text;
alter table rpta_column2layout ALTER COLUMN is_visible SET DEFAULT 1;
</#if> </#if>

16
superx/edit/rpta/rpta_column_layout_add_column.inc

@ -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…
Cancel
Save