From 13c9b648fe04cccdf4035d083f386a93125c0dfe Mon Sep 17 00:00:00 2001 From: Daniel Quathamer Date: Thu, 7 Nov 2024 07:55:52 +0100 Subject: [PATCH] Bugfix column.is_visible, format_code auswerten #4 --- .../module/rpta/masken/45000_maskeninfo.unl | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/src-modules/module/rpta/masken/45000_maskeninfo.unl b/src-modules/module/rpta/masken/45000_maskeninfo.unl index 711e8cf..08dad2e 100644 --- a/src-modules/module/rpta/masken/45000_maskeninfo.unl +++ b/src-modules/module/rpta/masken/45000_maskeninfo.unl @@ -146,8 +146,17 @@ group by\ \ ;\ \ +<#assign number_of_visible_colums=0 />\ +<#foreach column in columns>\ +<#if column.is_visible!=0>\ +<#assign number_of_visible_colums=number_of_visible_colums+1 />\ +\ +\ +<#assign colnr=0 />\ select \ <#foreach column in columns>\ +<#if column.is_visible!=0>\ +<#assign colnr=colnr+1 />\ <#assign format_sql="" />\ <#if column.format_sql?string != "">\ <#assign format_sql=column.format_sql />\ @@ -156,13 +165,15 @@ select \ <#if column.coltype=="computedColumn">\ (${column.colfunction})${format_sql} as ${column.targetfieldname}\ <#else>\ -${column.targetfieldname}${format_sql}\ +${column.targetfieldname}${format_sql} as ${column.targetfieldname}\ \ -<#if column_has_next>,\ +\ +<#if colnr < number_of_visible_colums>,\ + --wenn sichtbar\ \ from tmp_stud2\ -order by <#list 1..groupby as i>${i}\ -<#if i != groupby>\ +order by <#list 1..number_of_visible_colums as i>${i}\ +<#if i != number_of_visible_colums>\ ,\ \ \ @@ -181,8 +192,10 @@ drop table if exists tmp_stud;\ white_space_color=COLOR_WHITE fixed_columns=1\ min_heading_height=55\ <#foreach column in columns>\ +<#if column.is_visible!=0>\ Column CID=0 heading_text="${column.caption}" center_heading explanation="${column.description}"\ row_selectable heading_platform readonly\ width=${column.visible_width} text_size=60\ +\ \ @@@^Studienfach^Anzahl bzw. Anteil^Datenblatt Studierendenstatistik^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^<>SELECT description FROM rpta_column_layout where tid=<>;^