|
|
|
@ -1,4 +1,4 @@
@@ -1,4 +1,4 @@
|
|
|
|
|
333^RPTA-Makros^<#macro rpta_column_layout_fuellen>\ |
|
|
|
|
84^RPTA-Makros^<#macro rpta_column_layout_fuellen>\ |
|
|
|
|
CREATE temp TABLE tmp_rpta_column\ |
|
|
|
|
(\ |
|
|
|
|
uniquename varchar(255) NOT NULL,\ |
|
|
|
@ -12,7 +12,9 @@ CREATE temp TABLE tmp_rpta_column\
@@ -12,7 +12,9 @@ CREATE temp TABLE tmp_rpta_column\
|
|
|
|
|
is_aggregate smallint,\ |
|
|
|
|
resultset_id integer,\ |
|
|
|
|
sortnr integer,\ |
|
|
|
|
description TEXT\ |
|
|
|
|
description TEXT,\ |
|
|
|
|
format_code_uniquename varchar(255),\ |
|
|
|
|
format_code_id integer\ |
|
|
|
|
);\ |
|
|
|
|
\ |
|
|
|
|
CREATE temp TABLE tmp_rpta_column_layout\ |
|
|
|
@ -55,7 +57,8 @@ INSERT INTO tmp_rpta_column\
@@ -55,7 +57,8 @@ INSERT INTO tmp_rpta_column\
|
|
|
|
|
visible_size,\ |
|
|
|
|
is_aggregate,\ |
|
|
|
|
sortnr,\ |
|
|
|
|
description\ |
|
|
|
|
description,\ |
|
|
|
|
format_code_uniquename\ |
|
|
|
|
)\ |
|
|
|
|
select R.tid,\ |
|
|
|
|
'${column.uniquename}',\ |
|
|
|
@ -63,18 +66,24 @@ select R.tid,\
@@ -63,18 +66,24 @@ select R.tid,\
|
|
|
|
|
'${column.srcfieldname}',\ |
|
|
|
|
<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>,\ |
|
|
|
|
T.tid as column_type,\ |
|
|
|
|
'${column.col_function}',\ |
|
|
|
|
<#if column.col_function?exists>'${column.col_function}'<#else>null::varchar </#if>,\ |
|
|
|
|
${column.is_visible},\ |
|
|
|
|
${column.visible_size},\ |
|
|
|
|
${column.is_aggregate},\ |
|
|
|
|
${sortnr*10},\ |
|
|
|
|
'${column.description}'\ |
|
|
|
|
<#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_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\ |
|
|
|
@ -192,14 +201,16 @@ insert into rpta_column2layout(column_id,\
@@ -192,14 +201,16 @@ insert into rpta_column2layout(column_id,\
|
|
|
|
|
is_visible,\ |
|
|
|
|
visible_size,\ |
|
|
|
|
caption,\ |
|
|
|
|
description)\ |
|
|
|
|
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.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\ |
|
|
|
|