| 
						
						
						
					 | 
					 | 
					@ -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\ | 
					 | 
					 | 
					 | 
					CREATE temp TABLE tmp_rpta_column\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					(\ | 
					 | 
					 | 
					 | 
					(\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					   uniquename       varchar(255)   NOT NULL,\ | 
					 | 
					 | 
					 | 
					   uniquename       varchar(255)   NOT NULL,\ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -12,7 +12,9 @@ CREATE temp TABLE tmp_rpta_column\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					   is_aggregate     smallint,\ | 
					 | 
					 | 
					 | 
					   is_aggregate     smallint,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					   resultset_id     integer,\ | 
					 | 
					 | 
					 | 
					   resultset_id     integer,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					   sortnr integer,\ | 
					 | 
					 | 
					 | 
					   sortnr integer,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					   description TEXT\ | 
					 | 
					 | 
					 | 
					   description TEXT,\ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					   format_code_uniquename varchar(255),\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					   format_code_id integer\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					);\ | 
					 | 
					 | 
					 | 
					);\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					\ | 
					 | 
					 | 
					 | 
					\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					CREATE temp TABLE tmp_rpta_column_layout\ | 
					 | 
					 | 
					 | 
					CREATE temp TABLE tmp_rpta_column_layout\ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -55,7 +57,8 @@ INSERT INTO tmp_rpta_column\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  visible_size,\ | 
					 | 
					 | 
					 | 
					  visible_size,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  is_aggregate,\ | 
					 | 
					 | 
					 | 
					  is_aggregate,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  sortnr,\ | 
					 | 
					 | 
					 | 
					  sortnr,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  description\ | 
					 | 
					 | 
					 | 
					  description,\ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  format_code_uniquename\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  )\ | 
					 | 
					 | 
					 | 
					  )\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					select R.tid,\ | 
					 | 
					 | 
					 | 
					select R.tid,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					'${column.uniquename}',\ | 
					 | 
					 | 
					 | 
					'${column.uniquename}',\ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -63,18 +66,24 @@ select R.tid,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					'${column.srcfieldname}',\ | 
					 | 
					 | 
					 | 
					'${column.srcfieldname}',\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>,\ | 
					 | 
					 | 
					 | 
					<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					T.tid as column_type,\ | 
					 | 
					 | 
					 | 
					T.tid as column_type,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					'${column.col_function}',\ | 
					 | 
					 | 
					 | 
					<#if column.col_function?exists>'${column.col_function}'<#else>null::varchar  </#if>,\ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					${column.is_visible},\ | 
					 | 
					 | 
					 | 
					${column.is_visible},\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					${column.visible_size},\ | 
					 | 
					 | 
					 | 
					${column.visible_size},\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					${column.is_aggregate},\ | 
					 | 
					 | 
					 | 
					${column.is_aggregate},\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					${sortnr*10},\ | 
					 | 
					 | 
					 | 
					${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\ | 
					 | 
					 | 
					 | 
					FROM rpta_resultset R, rpta_column_type T\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					where R.uniquename='${rpta_column_layout.rpta_resultset}'\ | 
					 | 
					 | 
					 | 
					where R.uniquename='${rpta_column_layout.rpta_resultset}'\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					and T.uniquename='${column.column_type}';\ | 
					 | 
					 | 
					 | 
					and T.uniquename='${column.column_type}';\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					\ | 
					 | 
					 | 
					 | 
					\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					</#foreach>\ | 
					 | 
					 | 
					 | 
					</#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\ | 
					 | 
					 | 
					 | 
					select * into temp tmp_rpta_column2layout\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from rpta_column2layout\ | 
					 | 
					 | 
					 | 
					from rpta_column2layout\ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -87,7 +96,7 @@ and L.uniquename='${rpta_column_layout.uniquename}'\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					; \ | 
					 | 
					 | 
					 | 
					; \ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  \ | 
					 | 
					 | 
					 | 
					  \ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					select uniquename into temp tmp_rpta_column_layout_target\ | 
					 | 
					 | 
					 | 
					select uniquename into temp tmp_rpta_column_layout_target\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					from rpta_column_layout  \ | 
					 | 
					 | 
					 | 
					from rpta_column_layout\ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					where resultset_id in (select tid\ | 
					 | 
					 | 
					 | 
					where resultset_id in (select tid\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					FROM rpta_resultset\ | 
					 | 
					 | 
					 | 
					FROM rpta_resultset\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					where uniquename='${rpta_column_layout.rpta_resultset}')\ | 
					 | 
					 | 
					 | 
					where uniquename='${rpta_column_layout.rpta_resultset}')\ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -192,14 +201,16 @@ insert into rpta_column2layout(column_id,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					       is_visible,\ | 
					 | 
					 | 
					 | 
					       is_visible,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					       visible_size,\ | 
					 | 
					 | 
					 | 
					       visible_size,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					       caption,\ | 
					 | 
					 | 
					 | 
					       caption,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  description)\ | 
					 | 
					 | 
					 | 
					  description,\ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  format_code_id)\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					select C.tid as column_id,\ | 
					 | 
					 | 
					 | 
					select C.tid as column_id,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					       L.tid as layout_id,\ | 
					 | 
					 | 
					 | 
					       L.tid as layout_id,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					       T.sortnr,\ | 
					 | 
					 | 
					 | 
					       T.sortnr,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					       T.is_visible,\ | 
					 | 
					 | 
					 | 
					       T.is_visible,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					       T.visible_size,\ | 
					 | 
					 | 
					 | 
					       T.visible_size,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					       T.caption,\ | 
					 | 
					 | 
					 | 
					       T.caption,\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  T.description\ | 
					 | 
					 | 
					 | 
					  T.description,\ | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					  T.format_code_id\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					FROM rpta_column C,  rpta_column_layout L, tmp_rpta_column T\ | 
					 | 
					 | 
					 | 
					FROM rpta_column C,  rpta_column_layout L, tmp_rpta_column T\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					where C.uniquename=T.uniquename\ | 
					 | 
					 | 
					 | 
					where C.uniquename=T.uniquename\ | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					and C.resultset_id=T.resultset_id\ | 
					 | 
					 | 
					 | 
					and C.resultset_id=T.resultset_id\ | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |