Compare commits

..

24 Commits

Author SHA1 Message Date
Marlies Winterstein 2412b44fb2 Parameter Felder in Spalten (800000520) umbenannt 3 days ago
Daniel Quathamer 13c9b648fe Bugfix column.is_visible, format_code auswerten #4 3 days ago
Daniel Quathamer ea898da86b Kleinkram 3 days ago
Marlies Winterstein b93392c44b Einschränkung auf Parameter Felder eingefügt, Übertragung hatte wohl beim ersten Mal nicht geklappt 4 days ago
Daniel Quathamer 9ea519ba8c Installation unter HISinOne mit neuer Komponentneverwaltung ermöglicht #1 2 weeks ago
Daniel Quathamer ead2889a94 Installation unter HISinOne mit neuer Komponentneverwaltung ermöglicht #1 2 weeks ago
Daniel Quathamer 4abffa49a9 Versionspflege 2 weeks ago
Daniel Quathamer e9d33449f3 Bugfix Spaltenbreiten in JR-Export bei verknüpften Spaltenüberschriften #2 2 weeks ago
Daniel Quathamer 87e5524734 Bugfix Spaltenbreiten in JR-Export bei verknüpften Spaltenüberschriften #2 2 weeks ago
Daniel Quathamer 3ad01e5b5b Bugfix Insert neue Columns #1 3 weeks ago
Daniel Quathamer 1ef9a41ca2 Bugfix Berichtsassistent bei 5.2 3 weeks ago
Daniel Quathamer 6470556dd8 Ermögliche DIN A0 Ausgabe #1 4 weeks ago
Daniel Quathamer 6f27b2cf8f Merge branch 'rpta_0.2_Release' 4 weeks ago
Daniel Quathamer 94829d39e0 Bugfix Insert neue Columns #1 4 weeks ago
Daniel Quathamer ddd8e1f0aa Bugfix sx_stylesheets.stylesheet_type wird überschrieben durch KERN Upgrade #2 4 weeks ago
Daniel Quathamer ec0eac6989 Kompatibilität zu Kern 5.2 erste Schritte #5 4 weeks ago
Daniel Quathamer 76fda7be0f Bugfix sx_stylesheets.stylesheet_type wird überschrieben durch KERN Upgrade #2 4 weeks ago
Marlies Winterstein 0645936ec3 Zusatzfilter für die Ausgabe der Datensätze eingebaut 1 month ago
Daniel Quathamer 07e49424df Bufix Sortierung un dLabel von Spalten #4 2 months ago
Daniel Quathamer ebaba25d86 Bugfix Version 0.2 #4 6 months ago
Daniel Quathamer 811e2d042d Version 0.2 #4 6 months ago
Daniel Quathamer a9e9d19a88 Neue Admin-Maske #4 8 months ago
Daniel Quathamer 9273533bb2 Flexible Tabellenausgabe von virtuellen Beständen #4 9 months ago
Daniel Quathamer d25a955e75 Export von Datenbalken #3 10 months ago
  1. 18
      .classpath
  2. 17
      .project
  3. 73
      build.xml
  4. 2
      src-modules/module/rpta/conf/customize.sql.sam
  5. 1
      src-modules/module/rpta/conf/includes.txt
  6. 231
      src-modules/module/rpta/conf/rpta.xml
  7. 25
      src-modules/module/rpta/masken/45000_felderinfo.unl
  8. 1
      src-modules/module/rpta/masken/45000_maske_system_bez.unl
  9. 13
      src-modules/module/rpta/masken/45000_masken_felder_bez.unl
  10. 201
      src-modules/module/rpta/masken/45000_maskeninfo.unl
  11. 1
      src-modules/module/rpta/masken/45000_sachgeb_maske_bez.unl
  12. 8
      src-modules/module/rpta/masken/45040_felderinfo.unl
  13. 1
      src-modules/module/rpta/masken/45040_maske_system_bez.unl
  14. 8
      src-modules/module/rpta/masken/45040_masken_felder_bez.unl
  15. 121
      src-modules/module/rpta/masken/45040_maskeninfo.unl
  16. 1
      src-modules/module/rpta/masken/45040_sachgeb_maske_bez.unl
  17. 292
      src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_rsz_fuellen.sql
  18. 4
      src-modules/module/rpta/schluesseltabellen/rpta_column_type.unl
  19. 3
      src-modules/module/rpta/schluesseltabellen/rpta_format_code.unl
  20. 14
      src-modules/module/rpta/schluesseltabellen/sachgebiete_fuellen.sql
  21. 3
      src-modules/module/rpta/schluesseltabellen/sachgebiete_loeschen.sql
  22. 449
      src-modules/module/rpta/schluesseltabellen/studierende_datenblatt_virtuell.sql
  23. 17
      src-modules/module/rpta/schluesseltabellen/sx_stylesheets_einfuegen.sql
  24. 95
      src-modules/module/rpta/upgrade/rpta_upgrade_man.sql
  25. 64
      src/de/superx/rpta/SvgProducer.java
  26. 1
      superx/WEB-INF/.gitignore
  27. BIN
      superx/WEB-INF/lib/superx-rpta.jar
  28. 912
      superx/xml/rpta_assistent.xsl
  29. 140
      superx/xml/rpta_templates.xsl

18
.classpath

@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/freemarker-2.3.25.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/postgresql-42.2.19.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/superx5.0.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/saxon-he-10.5.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib_ext/servlet-api.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/jersey-core-1.11.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/fop-2.2.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/spring-jdbc-3.0.3.RELEASE.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/kettle-core-6.0.0.0-353.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/log4j-core-2.16.0.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/log4j-1.2-api-2.16.0.jar"/>
<classpathentry kind="lib" path="/kern/superx/WEB-INF/lib/log4j-api-2.16.0.jar"/>
<classpathentry kind="output" path="superx/WEB-INF/classes"/>
</classpath>

17
.project

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>rpta</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

73
build.xml

@ -2,11 +2,27 @@ @@ -2,11 +2,27 @@
<project name="ModuleCreation" default="help" basedir=".">
<!--Aufruf mit
VIZ-JAR erzeugen:
ant -DWEBAPP=$WEBAPP distRpta
ant -DWEBAPP=$WEBAPP cleanBuildPath
-->
<dirname file="${ant.file}" property="moduleCreateBaseDir" />
<property name="BASE_DIR" value="${moduleCreateBaseDir}/../.." />
<dirname file="${ant.file.superx}" property="superxBuildBaseDir" />
<property name="distDir" location="${superxBuildBaseDir}/superx/WEB-INF/lib" />
<property name="BASE_DIR" value="." />
<property name="WEBAPP" value="${MODULE_PATH}/../../../webserver/tomcat/webapps/superx" />
<property name="BUILD_PATH" value="${WEBAPP}/WEB-INF/classes"/>
<property name="SRC_DIR" value="${BASE_DIR}/src" />
<property name="SRC_DIR_TEST" value="${BASE_DIR}/test-src"/>
<property name="LIB_SUPERX_DIR" value="${WEBAPP}/WEB-INF/lib"/>
<property name="LIB_WEBAPP_DIR" value="${WEBAPP}"/>
<property name="LIB_EXT_SUPERX_DIR" value="${WEBAPP}/WEB-INF/lib_ext"/>
<property name="superx-classes" value="${WEBAPP}/WEB-INF/classes" />
<property name="src-java" value="${SRC_DIR}"/>
<property name="rpta_version" value="0.2" />
<path id="classpath">
<!--WEB-INF/lib-->
<fileset dir="${WEBAPP}/WEB-INF">
@ -39,6 +55,14 @@ @@ -39,6 +55,14 @@
<antcall target="call_module_scripts_create_ant" />
<antcall target="module_copy_webapp_files" />
</target>
<target name="initTimestamp">
<tstamp>
<format property="SX_TIMESTAMP" pattern="dd.MM.yyyy HH:mm" />
</tstamp>
</target>
<target name="module_copy_source" description="Kopiere Modul Sourcen in den WEB-INF-Verzeichnisbaum">
<echo message="Start module_copy_sources für Modul ${MODULE} in Pfad ${MODULE_PATH}" />
<copy todir="${MODULE_PATH}" overwrite="true">
@ -77,6 +101,53 @@ @@ -77,6 +101,53 @@
<fileset dir="${MODULE_PATH}/../../conf" includes="build.xml" />
</subant>
</target>
<target name="distRpta" depends="compileSuperx" description="Erzeugt die superx-etl.jar. ">
<delete>
<fileset dir="${distDir}" includes="superx-rpta*.jar" />
</delete>
<jar destfile="${distDir}/superx-rpta.jar" basedir="${BUILD_PATH}" includes="de/superx/rpta/** de/superx/sxrest/**" excludes="freemarker/**/* com/**/* javax/**/* **/*.java">
<manifest>
<!-- Who is building this jar? -->
<attribute name="Built-By" value="superx"/>
<!-- Information about the program itself -->
<attribute name="Implementation-Date" value="${SX_TIMESTAMP}"/>
<attribute name="Implementation-Title" value="SuperX"/>
<attribute name="Implementation-Version" value="${version}"/>
</manifest>
</jar>
</target>
<target name="compileSuperx" depends="cleanBuildPath" description="Compile all classes for superx.">
<filter token="sxtimestamp" value="${SX_TIMESTAMP}" />
<filter token="version" value="${rpta_version}" />
<!-- MB 13.8.2009 auch mitkompilieren <echo message="de/memtext/db/Servlet* weggelassen"/>-->
<copy todir="${BUILD_PATH}" filtering="true">
<fileset dir="${SRC_DIR}">
<include name="**/*.java" />
<include name="**/*.properties" />
<include name="**/*.gif" />
<include name="**/*.xml" />
<include name="edustore/*" />
<include name="saiku-datasources/*" />
<include name="saiku-repository/*" />
<exclude name="de/superx/docmanagement/*"/>
</fileset>
</copy>
<!--<echo message="cp:${FULL_CLASSPATH}"/>-->
<javac source="1.8" target="1.8"
srcdir="${BUILD_PATH}" excludes="**/*Test*.java,test/**/*"
destdir="${BUILD_PATH}"
listfiles="false" encoding="UTF-8" debug="yes">
<classpath refid="classpath" />
</javac>
</target>
<target name="cleanBuildPath" depends="initTimestamp" description="Löscht alle *.class-Dateien in WEB-INF/classes">
<delete failonerror="false" includeemptydirs="true">
<fileset dir="${BUILD_PATH}" includes="**/*.class,**/*.java" excludes="*.properties" />
</delete>
</target>
<target name="xml2jrxml_tabelle_a4_quer" description="Target: aus einer XML-Datei (SuperX-Bericht XML-Export) eine JRXML-Datei"
depends="init">
<!-- Aufruf:

2
src-modules/module/rpta/conf/customize.sql.sam

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
--rücksichern der eigenen Styles:
\! cp $WEBAPP/WEB-INF/reports/simple_table_myorg.jrtx $WEBAPP/WEB-INF/reports/simple_table.jrtx

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

@ -3,6 +3,7 @@ WEB-INF/conf/edustore/db/bin/SQL_ENV_rpta.sam @@ -3,6 +3,7 @@ WEB-INF/conf/edustore/db/bin/SQL_ENV_rpta.sam
images/icons/file-excel_rpta.svg
images/icons/magic.svg
WEB-INF/conf/edustore/db/module/rpta/schluesseltabellen/sx_stylesheets_einfuegen.sql
WEB-INF/lib/superx-rpta.jar
WEB-INF/reports/simple_table.jrtx
xml/tabelle_jrxml_a4_quer.xsl
xml/tabelle_jrxml_book_without_cover.xsl

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

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE module SYSTEM "../../../conf/superx-module.dtd"> -->
<module name="rpta" version="0.1" sachgebiet_id="330"
<module name="rpta" version="0.3b" sachgebiet_id="330"
sachgebiet="Berichtsassistent" systeminfo_id="330"
system="Berichtsassistent" thema="Berichtsassistent" thema_parent="Abfragen">
<database name="superx" system="superx">
@ -14,15 +14,16 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> @@ -14,15 +14,16 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
<description>Schlüsseltabelle für Spaltendefinitionen</description>
<columns>
<column name="tid" type="SERIAL" size="" default="" notnull="true" description="tid" isKey="true"/>
<column name="uniquename" type="VARCHAR" size="255" default="" notnull="true" description="Unique Name" />
<column name="uniquename" type="VARCHAR" size="255" default="" notnull="true" description="Schlüssel" />
<column name="caption" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" />
<column name="srcfieldname" type="VARCHAR" size="255" default="" notnull="" description="Quellfeld" />
<column name="targetfieldname" type="VARCHAR" size="255" default="" notnull="" description="Zielfeld" />
<column name="column_type" type="INTEGER" size="" default="" notnull="" description="Spaltentyp" ><comment>Physische Spalte/Logische Spalte/Lookup</comment></column>
<column name="col_function" type="VARCHAR" size="255" default="" notnull="" description="Funktion" ><comment>Bei logischen Spalten/Lookup</comment></column>
<column name="is_visible" type="SMALLINT" size="2" default="" notnull="" description="Sichtbare Spalte" ></column>
<column name="visible_size" type="SMALLINT" size="2" default="" notnull="" description="Länge in Zeichen" ><comment>Bei String-Spalten</comment></column>
<column name="srcfieldname" type="VARCHAR" size="255" default="" notnull="false" description="Feldname (Quelle)" />
<column name="targetfieldname" type="VARCHAR" size="255" default="" notnull="false" description="Feldname (Ziel)" />
<column name="column_type" type="INTEGER" size="" default="" notnull="true" description="Spaltentyp" ><comment>Physische Spalte/Logische Spalte/Lookup</comment></column>
<column name="col_function" type="TEXT" size="255" default="" notnull="" description="Funktion" ><comment>Bei logischen Spalten/Lookup</comment></column>
<column name="is_aggregate" type="SMALLINT" size="2" default="" notnull="" description="Aggregierte Spalte" ></column>
<column name="resultset_id" type="INTEGER" size="255" default="" notnull="" description="Resultset" />
<column name="custom" type="INTEGER" size="255" default="1" notnull="" description="Manuell erstellt" ><comment>0 = Auslieferung</comment></column>
<column name="description" type="TEXT" size="255" default="" notnull="" description="Beschreibung" ><comment>Erläuterungstext</comment></column>
</columns>
<primaryKeys><rs>
@ -46,7 +47,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> @@ -46,7 +47,7 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
<description>Spaltentypen</description>
<columns>
<column name="tid" type="SERIAL" size="" default="" notnull="true" description="tid" isKey="true"/>
<column name="uniquename" type="VARCHAR" size="255" default="" notnull="true" description="Unique Name" />
<column name="uniquename" type="VARCHAR" size="255" default="" notnull="true" description="Schlüssel" />
<column name="caption" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" />
</columns>
<primaryKeys><rs>
@ -62,6 +63,30 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> @@ -62,6 +63,30 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
</primaryKeys>
<indexes>
</indexes>
</table>
<table name="rpta_format_code" thema="Berichtsassistent" typ="Schlüsseltabelle"
releaseUnload="empty">
<description>Zahlen- oder Datumsformat</description>
<columns>
<column name="tid" type="SERIAL" size="" default="" notnull="true" description="tid" isKey="true"/>
<column name="uniquename" type="VARCHAR" size="255" default="" notnull="true" description="Schlüssel" />
<column name="caption" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" />
<column name="sql_code" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" />
</columns>
<primaryKeys><rs>
<row>
<fld name='table_cat'>superx</fld>
<fld name='table_schem'>superx</fld>
<fld name='table_name'>rpta_format_code</fld>
<fld name='column_name'>tid</fld>
<fld name='key_seq'>1</fld>
<fld name='pk_name'>rpta_format_code_pk</fld>
</row>
</rs>
</primaryKeys>
<indexes>
</indexes>
</table>
<table name="rpta_column_layout" thema="Berichtsassistent" typ="Schlüsseltabelle"
@ -69,10 +94,14 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> @@ -69,10 +94,14 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
<description>Spaltenlayouts</description>
<columns>
<column name="tid" type="SERIAL" size="" default="" notnull="true" description="tid" isKey="true"/>
<column name="uniquename" type="VARCHAR" size="255" default="" notnull="true" description="Unique Name" />
<column name="caption" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" />
<column name="uniquename" type="VARCHAR" size="255" default="" notnull="true" description="Schlüssel" />
<column name="caption" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" sortable="true"/>
<column name="resultset_id" type="INTEGER" size="255" default="" notnull="" description="Resultset" />
<column name="whereclause" type="TEXT" size="255" default="" notnull="false" description="Bedingung (optional)" />
<column name="description" type="TEXT" size="255" default="" notnull="" description="Beschreibung" ><comment>Erläuterungstext</comment></column>
<column name="userinfo_id" type="INTEGER" size="255" default="" notnull="" description="Angelegt von" ></column>
<column name="sortnr" type="INTEGER" size="255" default="" notnull="" description="Sortiernummer" sortable="true"><comment>Kann leer bleiben, wenn nach Bezeichnung sortiert wird.</comment></column>
</columns>
<primaryKeys><rs>
<row>
@ -90,13 +119,12 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> @@ -90,13 +119,12 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
</indexes>
</table>
<table name="rpta_column2resultset" thema="Berichtsassistent" typ="Schlüsseltabelle"
<!--<table name="rpta_column2resultset" thema="Berichtsassistent" typ="Schlüsseltabelle"
releaseUnload="empty">
<description>Spalten zu Resultsets</description>
<columns>
<column name="tid" type="SERIAL" size="" default="" notnull="true" description="tid" isKey="true"/>
<column name="column_id" type="INTEGER" size="255" default="" notnull="" description="Spalte" />
<column name="resultset_id" type="INTEGER" size="255" default="" notnull="" description="Resultset" />
</columns>
<primaryKeys><rs>
@ -113,15 +141,21 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> @@ -113,15 +141,21 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
<indexes>
</indexes>
</table>
</table>-->
<table name="rpta_column2layout" thema="Berichtsassistent" typ="Schlüsseltabelle"
releaseUnload="empty">
<description>Spalten zu Layouts</description>
<columns>
<column name="tid" type="SERIAL" size="" default="" notnull="true" description="tid" isKey="true"/>
<column name="column_id" type="INTEGER" size="255" default="" notnull="" description="Spalte" />
<column name="layout_id" type="INTEGER" size="255" default="" notnull="" description="Layout" />
<column name="sortnr" type="SMALLINT" size="2" default="" notnull="" description="Sortiernr." />
<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="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="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="targetfieldname" type="VARCHAR" size="255" default="" notnull="" description="Zielfeld" currentlyUsed="false" />
<column name="caption" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung der Spalte"><comment>Kann leer bleiben wenn der Spaltenname der Quellspalte übernommen werden soll.</comment></column>
<column name="description" type="TEXT" size="255" default="" notnull="" description="Beschreibung" ><comment>Erläuterungstext</comment></column>
</columns>
<primaryKeys><rs>
@ -145,12 +179,12 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> @@ -145,12 +179,12 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
<columns>
<column name="tid" type="SERIAL" size="" default="" notnull="true" description="tid" isKey="true"/>
<column name="caption" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" />
<column name="uniquename" type="VARCHAR" size="255" default="" notnull="" description="Bezeichnung" />
<column name="fieldclause" type="VARCHAR" size="255" default="" notnull="false" description="Defaultwert" />
<column name="joinclause" type="VARCHAR" size="255" default="" notnull="false" description="Defaultwert" />
<column name="whereclause" type="VARCHAR" size="255" default="" notnull="false" description="Einheit" />
<column name="uniquename" type="VARCHAR" size="255" default="" notnull="true" description="Schlüssel" />
<column name="fieldclause" type="TEXT" size="255" default="" notnull="false" description="Spalten (physisch)" />
<column name="joinclause" type="TEXT" size="255" default="" notnull="false" description="Tabellen (physisch)" />
<column name="whereclause" type="TEXT" size="255" default="" notnull="false" description="Bedingung" />
<column name="systeminfo_id" type="INTEGER" size="255"
default="" notnull="false" description="Quellsystem">
default="" notnull="true" description="Komponente">
</column>
</columns>
@ -165,7 +199,10 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> @@ -165,7 +199,10 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
</row>
</rs>
</primaryKeys>
<indexes>
<indexes><index name="ix_rpta_resultset" type="unique">
<index-column name="uniquename"/>
<index-column name="systeminfo_id"/>
</index>
</indexes>
</table>
<table name="rpta_report_property" thema="Berichtsassistent" typ="Datentabelle"
@ -212,14 +249,20 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" /> @@ -212,14 +249,20 @@ rightname="CS_BIA_STANDARDREPORTS_ADMIN[RPTA]" />
parent="Berichtsassistent">Abfragen zur Administration von Berichtsassistent </thema>
</themen>
<masken>
<!--
<maske tid="45000" name="Berichtsassistent suchen" thema="Administration Berichtsassistent">
<maske tid="45000" name="Tabellenausgabe Studierende (amtlich und intern)" thema="Berichtsassistent">
<description>Berichtsassistent verwalten</description>
<src>
<path>$RPTA_PFAD/masken</path>
</src>
</maske>
-->
<maske tid="45040" name="Spaltenlayouts verwalten" thema="Administration Berichtsassistent">
<description>Spaltenlayouts verwalten</description>
<src>
<path>$RPTA_PFAD/masken</path>
</src>
</maske>
</masken>
<data-integrity>
@ -228,11 +271,16 @@ parent="Berichtsassistent">Abfragen zur Administration von Berichtsassistent </t @@ -228,11 +271,16 @@ parent="Berichtsassistent">Abfragen zur Administration von Berichtsassistent </t
displayType="select" visibleFields="caption" format="%s">
<relation-column from="tid" to="column_type" />
</relation>
x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE"
<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE"
displayType="select" visibleFields="caption" format="%s">
<relation-column from="tid" to="resultset_id" />
</relation>
<relation from="rpta_resultset" to="rpta_column2resultset" delete="FALSE"
<relation from="userinfo" to="rpta_column_layout" delete="FALSE"
displayType="select" visibleFields="benutzer" format="%s">
<relation-column from="tid" to="userinfo_id" />
</relation>
<relation from="rpta_resultset" to="rpta_column" delete="FALSE"
displayType="select" visibleFields="caption" format="%s">
<relation-column from="tid" to="resultset_id" />
</relation>
@ -241,10 +289,7 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE" @@ -241,10 +289,7 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE"
<relation-column from="tid" to="systeminfo_id" />
</relation>
<relation from="rpta_column" to="rpta_column2resultset" delete="FALSE"
displayType="select" visibleFields="caption" format="%s">
<relation-column from="tid" to="column_id" />
</relation>
<relation from="rpta_column_layout" to="rpta_column2layout" delete="FALSE"
displayType="select" visibleFields="caption" format="%s">
<relation-column from="tid" to="layout_id" />
@ -253,7 +298,10 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE" @@ -253,7 +298,10 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE"
displayType="select" visibleFields="caption" format="%s">
<relation-column from="tid" to="column_id" />
</relation>
<relation from="rpta_format_code" to="rpta_column2layout" delete="FALSE"
displayType="select" visibleFields="caption" format="%s">
<relation-column from="tid" to="format_code_id" />
</relation>
</data-integrity>
</database>
@ -269,12 +317,65 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE" @@ -269,12 +317,65 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE"
</action>
</etl-step>
</etl>
<!-- Elemente nur für die neue KV von HIS:-->
<install_upgrade_job>
<install-upgrade-step name="pre_upgrade" type="container" id="rpta_preupgrade_containernode">
<action error="stop"/>
</install-upgrade-step>
<install-upgrade-step name="upgrade_tables" type="" id="rpta_upgrade_tables_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$RPTA_PFAD/upgrade/rpta_upgrade_tables_pg.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="upgrade_fields" type="" id="rpta_upgrade_fields_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$RPTA_PFAD/upgrade/rpta_upgrade_fields_pg.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="upgrade_views" type="" id="rpta_upgrade_views_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$RPTA_PFAD/upgrade/rpta_upgrade_views_pg.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="install_functions" type="container" id="rpta_install_functions_containernode">
<action error="stop"/>
</install-upgrade-step>
<install-upgrade-step name="upgrade_indices" type="" id="rpta_upgrade_indices_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$RPTA_PFAD/upgrade/rpta_upgrade_indexes_pg.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="fill_tables" type="" id="rpta_fill_tables_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$RPTA_PFAD/conf/sx_tables_fuellen.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="Update Module Metadata" type="container" id="rpta_update_module_metadata_container">
<action error="stop">
<nativeaction sql="" scriptfile="$RPTA_PFAD/conf/module_metadata.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="update_topic_tree" type="" id="rpta_update_topictree_actionstep">
<action error="stop">
<nativeaction sql="" scriptfile="$RPTA_PFAD/upgrade/rpta_upgrade_themenbaum.sql" database=""/>
</action>
</install-upgrade-step>
<install-upgrade-step name="install_masks" type="container" id="rpta_install_masks_containernode">
<action error="stop"/>
</install-upgrade-step>
</install_upgrade_job>
<install>
<install-step name="Füllen der Modul-Tabellen">
<action error="stop">
<action>
<loadtable refresh="true" delimiter="^" header="false" tabname="rpta_column_type"><file path="$RPTA_PFAD/schluesseltabellen/rpta_column_type.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="rpta_format_code"><file path="$RPTA_PFAD/schluesseltabellen/rpta_format_code.unl"/></loadtable>
</action>
<action>
<nativeaction sql="" scriptfile="$RPTA_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$RPTA_PFAD/schluesseltabellen/sx_stylesheets_einfuegen.sql" database=""/>
<nativeaction sql="" scriptfile="$RPTA_PFAD/schluesseltabellen/studierende_datenblatt_virtuell.sql" database=""/>
<nativeaction sql="" scriptfile="$RPTA_PFAD/schluesseltabellen/rpta_column_layout_sos_stud_astat_rsz_fuellen.sql" database=""/>
</action>
</install-step>
</install>
@ -284,7 +385,15 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE" @@ -284,7 +385,15 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE"
<upgrade-step>
<action error="stop">
<loadtable refresh="true" delimiter="^" header="false" tabname="rpta_column_type"><file path="$RPTA_PFAD/schluesseltabellen/rpta_column_type.unl"/></loadtable>
<loadtable refresh="true" delimiter="^" header="false" tabname="rpta_format_code"><file path="$RPTA_PFAD/schluesseltabellen/rpta_format_code.unl"/></loadtable>
</action>
<action>
<nativeaction sql="" scriptfile="$RPTA_PFAD/schluesseltabellen/sachgebiete_fuellen.sql" database=""/>
<nativeaction sql="" scriptfile="$RPTA_PFAD/schluesseltabellen/sx_stylesheets_einfuegen.sql" database=""/>
<nativeaction sql="" scriptfile="$RPTA_PFAD/upgrade/rpta_upgrade_man.sql" database=""/>
<nativeaction sql="" scriptfile="$RPTA_PFAD/schluesseltabellen/studierende_datenblatt_virtuell.sql" database=""/>
<nativeaction sql="" scriptfile="$RPTA_PFAD/schluesseltabellen/rpta_column_layout_sos_stud_astat_rsz_fuellen.sql" database=""/>
</action>
<action>
@ -295,6 +404,8 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE" @@ -295,6 +404,8 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE"
<uninstall-step name="Deinstalliere Schlüssel">
<action error="stop">
<nativeaction sql="" scriptfile="$RPTA_PFAD/schluesseltabellen/sachgebiete_loeschen.sql" database=""/>
</action>
@ -311,7 +422,7 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE" @@ -311,7 +422,7 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE"
path="/edit/rpta/rpta_column_layout_list.jsp"
followUp=""
caption="Spaltenlayouts verwalten"
orderBy="caption"
orderBy="sortnr,caption"
gotoHt=""
helpfile=""
maxRows="*"
@ -322,6 +433,8 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE" @@ -322,6 +433,8 @@ x<relation from="rpta_resultset" to="rpta_column_layout" delete="FALSE"
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="caption" nullFieldValue="" visibleSize="30" />
<customfield name="uniquename" nullFieldValue="" visibleSize="30" />
<customfield name="sortnr" nullFieldValue="" visibleSize="30" />
<customfield type="link" name="Details" path="/superx/edit/rpta/rpta_column_layout_edit.jsp" linkid="tid"/>
</form>
@ -343,18 +456,53 @@ mode="full"> @@ -343,18 +456,53 @@ mode="full">
<field-selection complete="false" />
<customfield name="tid" />
<customfield name="caption" visibleSize="50" nullFieldValue="" />
<customfield name="uniquename" visibleSize="50" nullFieldValue="" />
<customfield name="resultset_id" visibleSize="50" nullFieldValue="" />
<customfield name="whereclause" visibleSize="50" nullFieldValue="" />
<customfield name="description" visibleSize="50" nullFieldValue="" />
<customfield name="sortnr" visibleSize="10" nullFieldValue="" />
<customfield name="Spalten" type="subform" multipart="false" autoUpdate="false"
maxRows="*" table="rpta_column2layout" parentField="tid" childField="layout_id"
orderBy="" allowNew="true"
orderBy="sortnr" allowNew="true"
mode="full">
<field-selection complete="false" />
<customfield name="layout_id" type="hidden" overrideValue="tid" />
<customfield name="column_id" nullFieldValue="" visibleSize="5" />
<customfield name="sortnr" nullFieldValue="" visibleSize="10" />
<customfield type="link" name="Details" path="/superx/edit/rpta/rpta_column2layout_edit.jsp"
linkVar="tid" linkid="tid" mandatoryFilter="" mandatoryFilterVar=""/>
</customfield>
</form>
<form name="rpta_column2layout_edit"
table="rpta_column2layout"
path="/edit/rpta/rpta_column2layout_edit.jsp"
followUp=""
caption="Spaltenlayouts bearbeiten"
orderBy="sortnr"
gotoHt=""
helpfile=""
maxRows="1"
mode="full">
<description>In diesem Formular können Sie Spaltenlayouts verwalten.</description>
<filters>
<filter mandatory="true" type="equals">tid</filter>
</filters>
<field-selection complete="false" />
<customfield name="tid" />
<customfield name="caption" visibleSize="50" nullFieldValue="" />
<customfield name="column_id" visibleSize="50" nullFieldValue="" />
<customfield name="layout_id" visibleSize="50" nullFieldValue="" />
<customfield name="sortnr" visibleSize="50" nullFieldValue="" />
<customfield name="is_visible" visibleSize="50" nullFieldValue="" />
<customfield name="visible_size" visibleSize="50" nullFieldValue="" />
<customfield name="format_code_id" visibleSize="50" nullFieldValue="" />
<customfield name="description" visibleSize="50" nullFieldValue="" />
</form>
<form name="rpta_resultset_list"
table="rpta_resultset"
@ -372,6 +520,7 @@ mode="full"> @@ -372,6 +520,7 @@ mode="full">
<field-selection complete="false" />
<customfield name="tid" nullFieldValue="" />
<customfield name="caption" nullFieldValue="" visibleSize="30" />
<customfield name="uniquename" nullFieldValue="" visibleSize="30" />
<customfield type="link" name="Details" path="/superx/edit/rpta/rpta_resultset_edit.jsp" linkid="tid"/>
</form>
<form name="rpta_resultset_edit"
@ -392,6 +541,7 @@ mode="full"> @@ -392,6 +541,7 @@ mode="full">
<field-selection complete="false" />
<customfield name="tid" />
<customfield name="caption" visibleSize="50" nullFieldValue="" />
<customfield name="uniquename" nullFieldValue="" visibleSize="30" />
<customfield name="fieldclause" visibleSize="50" nullFieldValue="" />
<customfield name="joinclause" visibleSize="50" nullFieldValue="" />
<customfield name="whereclause" visibleSize="10" nullFieldValue="" />
@ -437,13 +587,16 @@ mode="full"> @@ -437,13 +587,16 @@ mode="full">
<field-selection complete="false" />
<customfield name="tid" />
<customfield name="caption" visibleSize="50" nullFieldValue="" />
<customfield name="uniquename" visibleSize="50" nullFieldValue="" />
<customfield name="resultset_id" visibleSize="50" nullFieldValue="" />
<customfield name="srcfieldname" visibleSize="50" nullFieldValue="" />
<customfield name="targetfieldname" visibleSize="50" nullFieldValue="" />
<customfield name="column_type_id" visibleSize="10" nullFieldValue="" />
<customfield name="column_type" visibleSize="10" nullFieldValue="" />
<customfield name="col_function" visibleSize="100" nullFieldValue="" />
<customfield name="is_visible" visibleSize="10" nullFieldValue="" />
<customfield name="visible_size" visibleSize="10" nullFieldValue="" />
<customfield name="is_aggregate" visibleSize="10" nullFieldValue="" />
<customfield name="description" visibleSize="10" nullFieldValue="" />
</form>
</dbforms>

25
src-modules/module/rpta/masken/45000_felderinfo.unl

@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
45000^Spaltenlayout^3000^350^-1^140^180^1^integer^30^1^1^<<SQL>>SELECT tid,\
caption\
FROM rpta_column_layout \
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat'\
and R.systeminfo_id=7)\
order by sortnr, caption\
;^^<<SQL>>SELECT tid,\
caption\
FROM rpta_column_layout \
where resultset_id in (select R.tid from rpta_resultset R where R.uniquename='sos_stud_astat'\
and R.systeminfo_id=7)\
order by sortnr, caption\
;^
45001^Seit Semester^10^0^0^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^
45002^Fächer^30^0^0^130^200^6^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art='Fächer-Sicht' order by 3,2;^ ^ ^
45003^Abschluss^40^0^0^100^200^3^char^1500^0^1^<<SQL>> select apnr, druck from cifx where key=35 order by 2;^ ^ ^
45004^bis Fachsemester^1000^300^-1^200^100^1^integer^30^0^0^^ ^ ^
45006^Hochschulzugangsberechtigung^120^300^-1^200^200^1^sql^30^0^1^hs_zugangsber^apnr, eintrag^ ^
45007^Bis Semester^20^350^-1^140^80^1^integer^30^0^1^<<SQL>> select tid, eintrag from semester order by tid DESC;^ ^<<SQL>> select tid,eintrag from semester where today() between sem_beginn and sem_ende;^
45008^Staatsangehörigkeit^150^0^0^140^150^10^char^30^0^12^<<SQL>> select tid,name,sortnr from sichten where art='SOS-Staaten-Sicht' order by 3,2;^ ^ ^
45009^Studiengang^25^0^0^140^150^50^char^1000^0^12^<<SQL>> select tid,name,sortnr from sichten where art in ('SOS-Kostenstellen-Sicht', 'SOS-Studiengang-Sicht') order by 3,2;^ ^ ^
45011^Stichtag^23^330^-1^130^100^1^sql^30^1^1^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende';^ ^<<SQL>> select tid, name from sos_stichtag where stichtagsart='Studierende' and appl_key='0';^
45012^Hörerstatus^200^330^-1^140^150^1^sql^30^0^1^<<SQL>> select apnr, eintrag from hoererstatus order by 2^apnr, eintrag^<<SQL>> select apnr, eintrag from hoererstatus where eintrag='alle';^
45018^Köpfe oder Fälle ?^0^0^0^140^150^1^sql^70^0^1^<<SQL>> select apnr, eintrag from koepfe_oder_faelle order by 2^apnr, eintrag^<<SQL>> select apnr, eintrag from koepfe_oder_faelle where eintrag = 'Fälle';^
45022^Geschlecht^110^0^0^140^80^1^integer^30^0^1^<<SQL>> SELECT apnr,druck FROM cif where key = 9003 and apnr between 1 and 4 order by 1;^ ^ ^

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

@ -0,0 +1 @@ @@ -0,0 +1 @@
45000^7^

13
src-modules/module/rpta/masken/45000_masken_felder_bez.unl

@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
45000^45000^
45000^45001^
45000^45002^
45000^45003^
45000^45004^
45000^45006^
45000^45007^
45000^45008^
45000^45009^
45000^45011^
45000^45012^
45000^45018^
45000^45022^

201
src-modules/module/rpta/masken/45000_maskeninfo.unl

@ -0,0 +1,201 @@ @@ -0,0 +1,201 @@
45000^Tabellenausgabe Studierende (amtlich und intern)^--Freemarker Template\
<#include "SQL_lingua_franca"/>\
<#include "SuperX_general"/>\
--\
--Autor D. Quathamer 2024\
<sqlvars>\
<sqlvar name="basetable" type="hash"><![CDATA[\
<#assign my_base_rs='sos_stud_astat' />\
SELECT distinct name,\
0::smallint as is_virtual,\
name as runtime_tablename\
from sx_tables\
where name in ('${my_base_rs}')\
and 0=(select count(*) from rpta_resultset R where R.uniquename='${my_base_rs}')\
union\
select R.uniquename,\
1::smallint as is_virtual,\
'tmp_' || R.uniquename as runtime_tablename\
from rpta_resultset R where R.uniquename='${my_base_rs}'\
;\
]]>\
</sqlvar>\
<sqlvar name="rpta_resultset" type="hash"><![CDATA[\
select caption,\
uniquename,\
fieldclause,\
joinclause,\
whereclause,\
systeminfo_id\
from rpta_resultset\
where uniquename='${basetable.name}';\
\
]]></sqlvar>\
<sqlvar name="rpta_column_layout" type="hash"><![CDATA[\
select L.uniquename,\
L.caption,\
L.whereclause\
from rpta_resultset R, rpta_column_layout L\
where L.resultset_id=R.tid\
and R.uniquename='${basetable.name}'\
and L.tid=<<Spaltenlayout>>;\
\
]]></sqlvar>\
<sqlvar name="columns" type="hashsequence"><![CDATA[\
SELECT C.srcfieldname,\
(case when string_not_null(C.targetfieldname)='' then C.srcfieldname else C.targetfieldname end) as targetfieldname,\
T.uniquename as coltype,\
C.is_aggregate,\
(case when string_not_null(CL.caption)='' then C.caption else CL.caption end) as caption,\
CL.is_visible,\
CL.visible_size as visible_width,\
(select F.sql_code from rpta_format_code F where F.tid=CL.format_code_id) as format_sql,\
C.col_function as colfunction,\
(case when string_not_null(CL.description)='' then C.description else CL.description end) as description\
FROM rpta_column_layout L, rpta_column2layout CL, rpta_column C, rpta_column_type T\
where L.tid=CL.layout_id\
and C.tid=CL.column_id\
and T.tid=C.column_type\
and L.tid=<<Spaltenlayout>>\
/* and C.uniquename in (<<Spalten>>) */\
order by CL.sortnr\
;\
]]></sqlvar>\
</sqlvars>\
\
<#assign filter="<<Köpfe oder Fälle ?>>\
/* and sem_rueck_beur_ein >= <<Seit Semester>> */\
/* and sem_rueck_beur_ein <= <<Bis Semester>> */\
/* and sem_rueck_beur_ein = <<Semester>> */\
/* and stichtag = <<Stichtag>> */\
/* and <<Hochschulzugangsberechtigung>> */\
/* and <<Hörerstatus>>*/\
/* and abschluss in (<<Abschluss>>) */\
/* and geschlecht = <<Geschlecht>> */\
/* and fach_sem_zahl <= <<bis Fachsemester>> */\
" />\
\
<#assign filter = filter + " and 's_' || tid_stg in "+Studiengang.allNeededKeysList /> \
/* <#assign filter = filter + " and '' || ca12_staat in "+Staatsangehörigkeit.allNeededKeysList /> --<<Staatsangehörigkeit>> */\
/* <#assign filter = filter + " and stg in "+Fächer.allNeededKeysList /> --<<Fächer>> */\
\
<#if columns?has_content>\
\
<#if basetable.is_virtual==1>\
\
create temp table ${basetable.runtime_tablename} as\
select ${rpta_resultset.fieldclause} \
from ${rpta_resultset.joinclause} \
where 1=1\
<#if rpta_resultset.whereclause != ""> \
${rpta_resultset.whereclause} </#if>\
and ${filter}\
;\
</#if>\
\
\
\
select \
--zuerst die Basisdaten:\
<#foreach column in columns>\
<#if column.coltype="physicalColumn">\
${column.srcfieldname},\
<#elseif column.coltype="logicalColumn">\
${column.colfunction} as ${column.targetfieldname},\
<#elseif column.coltype="lookupColumn">\
(${column.colfunction}) as ${column.targetfieldname},\
<#elseif column.coltype="computedColumn">\
null::decimal(19,6) as ${column.targetfieldname},\
</#if>\
</#foreach>\
null::char(1) as dummycol\
into temp tmp_stud\
from ${basetable.runtime_tablename}\
<#if rpta_column_layout.whereclause !="">\
where ${rpta_column_layout.whereclause}\
</#if>\
;\
\
\
--ergebnistabelle:\
select \
--zuerst die nicht-Aggregate:\
<#assign groupby=0 />\
<#foreach column in columns>\
<#if column.is_aggregate==0>\
<#assign groupby=groupby+1 />\
${column.targetfieldname},\
</#if>\
</#foreach>\
--dann die Aggregate:\
<#foreach column in columns>\
<#if column.is_aggregate==1 && column.coltype!="computedColumn">\
sum(${column.targetfieldname}) as ${column.targetfieldname},\
</#if>\
</#foreach>\
null::char(1) as dummycol\
into temp tmp_stud2\
from tmp_stud\
where 1=1\
/* ${<<Zusatzfilter>>} */\
group by\
<#list 1..groupby as i>${i}\
<#if i != groupby>\
,\
</#if>\
</#list>\
;\
\
<#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 />\
</#if>\
</#foreach>\
<#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 />\
</#if>\
\
<#if column.coltype=="computedColumn">\
(${column.colfunction})${format_sql} as ${column.targetfieldname}\
<#else>\
${column.targetfieldname}${format_sql} as ${column.targetfieldname}\
</#if>\
\
<#if colnr &lt; number_of_visible_colums>,</#if>\
</#if> --wenn sichtbar\
</#foreach>\
from tmp_stud2\
order by <#list 1..number_of_visible_colums as i>${i}\
<#if i != number_of_visible_colums>\
,\
</#if>\
</#list>\
;\
<#if basetable.is_virtual==1>\
drop table if exists ${basetable.runtime_tablename};\
</#if>\
\
\
drop table if exists tmp_stud;\
\
</#if> --wenn columns?has_content^--Freemarker Template\
XIL List\
sizable_columns horizontal_scrolling\
drop_and_delete movable_columns \
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\
</#if>\
</#foreach>\
@@@^Studienfach^Anzahl bzw. Anteil^Datenblatt Studierendenstatistik^drop table if exists tmp_stud2; drop table if exists tmp_stud3;^^2^850^540^^1^<<SQL>>SELECT description FROM rpta_column_layout where tid=<<Spaltenlayout>>;^

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

@ -0,0 +1 @@ @@ -0,0 +1 @@
16^45000^

8
src-modules/module/rpta/masken/45040_felderinfo.unl

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
45040^Benutzer/in^50^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,nvl(name,benutzer) from userinfo order by 2;^hidden^^
45041^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;^^^
45042^Spaltenlayouts verwalten^110^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_column_layout_list.jsp' from xdummy;^
45043^Stichwort^20^0^0^150^150^1^sql^50^0^0^^^^
45044^Komponente^1^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,name from systeminfo order by 2;^ ^^
45045^Virtuelle Tabellen bearbeiten^100^0^0^140^80^1^char^255^0^18^ ^ ^<<SQL>> select '../edit/rpta/rpta_resultset_list.jsp' from xdummy;^
45046^Virtuelle Tabelle^5^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_resultset where 1=1 /* and systeminfo_id=<<Komponente>> */ order by 2;^^^
45047^Spaltentyp^200^0^0^150^200^1^integer^200^0^1^<<SQL>> select tid,caption from rpta_column_type order by 2;^^ ^

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

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

8
src-modules/module/rpta/masken/45040_masken_felder_bez.unl

@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
45040^45040^
45040^45041^
45040^45042^
45040^45043^
45040^45044^
45040^45045^
45040^45046^
45040^45047^

121
src-modules/module/rpta/masken/45040_maskeninfo.unl

@ -0,0 +1,121 @@ @@ -0,0 +1,121 @@
45040^Spalten und Spaltenlayouts verwalten^--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),\
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)\
);\
insert into tmp_rpta_column (ord,\
tid,\
uniquename,\
caption,\
srcfieldname,\
column_type_str,\
col_function,\
is_aggregate,\
resultset_id,\
custom,\
description,\
targetfieldname,\
nextedit) \
select 1 as ord,\
C.tid,\
C.uniquename,\
C.caption,\
C.srcfieldname,\
T.caption as column_type,\
C.col_function,\
C.is_aggregate,\
C.resultset_id,\
C.custom,\
C.description,\
C.targetfieldname,\
('../edit/rpta/rpta_column_edit.jsp|tid=' || C.tid)::varchar(255)\
FROM rpta_column C, rpta_column_type T\
where T.tid=C.column_type\
/* and C.resultset_id=<<Virtuelle Tabelle>> */\
/* and C.caption like '%<<Stichwort>>%' */\
/* and C.tid in (select P.column_id from rpta_column2layout P where P.layout_id=<<Spaltenlayout>> )*/\
/* and C.resultset_id in (select R.tid from rpta_resultset R where R.systeminfo_id=<<Komponente>> )*/\
/* and C.column_type=<<Spaltentyp>> */\
;\
\
\
\
update tmp_rpta_column set resultset_str=R.caption\
from rpta_resultset R\
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 \
caption,\
uniquename,\
resultset_str,\
srcfieldname,\
column_type_str,\
-- col_function,\
is_aggregate,\
custom,\
-- description,\
-- targetfieldname\
nextedit \
\
from tmp_rpta_column\
order by ord,caption ,uniquename\
;^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="Name" center_heading\
row_selectable col_selectable heading_platform readonly\
width=50 text_size=100\
Column CID=0 heading_text="Schlüssel" center_heading\
row_selectable col_selectable heading_platform readonly\
width=50 text_size=100\
Column CID=1 heading_text="Virtuelle Tabelle" center_heading\
row_selectable col_selectable heading_platform readonly\
width=150 text_size=200\
Column CID=1 heading_text="Quellfeld" center_heading\
row_selectable col_selectable heading_platform readonly\
width=10 text_size=200\
Column CID=1 heading_text="Spaltentyp" center_heading\
row_selectable col_selectable heading_platform readonly\
width=5 text_size=200\
Column CID=1 heading_text="Ist Aggregat?" center_heading\
row_selectable col_selectable heading_platform readonly\
width=5 text_size=200\
Column CID=1 heading_text="Individuelle Spalte" center_heading\
row_selectable col_selectable heading_platform readonly\
width=5 text_size=200\
Column CID=1 heading_text="Bearbeiten" center_heading\
row_selectable col_selectable heading_platform readonly\
width=5 text_size=200\
@@@^^^Spaltendefinitionen und deren Zuordnung zu Berichten verwalten.^drop table tmp_rpta_column;^^1^440^360^0^1^^

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

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

292
src-modules/module/rpta/schluesseltabellen/rpta_column_layout_sos_stud_astat_rsz_fuellen.sql

@ -0,0 +1,292 @@ @@ -0,0 +1,292 @@
--freemarker template
<sqlvars>
<sqlvar name="sos_stud_astat_exists">
select count(*) from rpta_resultset where uniquename='sos_stud_astat';
</sqlvar>
</sqlvars>
<#assign rpta_column_layout = {"uniquename":"sos_stud_astat_rsz",
"caption":"MKW-Abfrage_Studierende_RSZ",
"rpta_resultset":"sos_stud_astat",
"whereclause":"fach_sem_zahl <= dim_studiengang_regel and dim_studiengang_regel between 1 and 20 and studiengang_nr <=2 and fach_nr <=4",
"description":"Fachbelegungen: 1. & 2. Studiengang; 1.-4. Fach; nur Studiengänge mit Angabe einer Regelstudienzeit"
}
/>
<#assign rpta_columns = [
{"uniquename":"sos_k_stort_astat",
"caption":"Hochschulnummer Statistik",
"srcfieldname":"sos_k_stort_astat",
"column_type":"physicalColumn",
"col_function":"",
"is_visible":"1",
"visible_size":"10",
"is_aggregate":"0",
"description":"Amtliche Standortnummer"
},
{"uniquename":"dim_studiengang_stg_astat",
"caption":"HSF-Schlüssel",
"srcfieldname":"dim_studiengang_stg_astat",
"column_type":"physicalColumn",
"col_function":"",
"is_visible":"1",
"visible_size":"10",
"is_aggregate":"0",
"description":"Amtliches Fach"
},
{"uniquename":"sos_k_stufrm_astat",
"caption":"Art des Studiums",
"srcfieldname":"sos_k_stufrm_astat",
"column_type":"physicalColumn",
"col_function":"",
"is_visible":"1",
"visible_size":"10",
"is_aggregate":"0",
"description":"Amtliche Studienform"
},
{"uniquename":"dim_studiengang_abschluss_astat",
"caption":"Abschlussschlüssel Statistik NRW",
"srcfieldname":"dim_studiengang_abschluss_astat",
"column_type":"physicalColumn",
"col_function":"",
"is_visible":"1",
"visible_size":"10",
"is_aggregate":"0",
"description":"Amtlicher Abschluss"
},
{"uniquename":"sos_k_stutyp_astat",
"caption":"Vollzeit / Teilzeit / ausbildungsintegriert / praxisintegriert / berufsintegriert",
"srcfieldname":"sos_k_stutyp_astat",
"column_type":"physicalColumn",
"col_function":"",
"is_visible":"1",
"visible_size":"10",
"is_aggregate":"0",
"description":"Amtlicher Studiumstyp"
},
{"uniquename":"dim_studiengang_regel",
"caption":"Angabe der Regelstudienzeit",
"srcfieldname":"dim_studiengang_regel",
"column_type":"physicalColumn",
"col_function":"",
"is_visible":"1",
"visible_size":"10",
"is_aggregate":"0",
"description":"Regelstudienzeit in Semestern"
},
{"uniquename":"summe",
"caption":"Anzahl der Studierenden in der Regelstudienzeit",
"srcfieldname":"summe",
"column_type":"physicalColumn",
"col_function":"sum",
"is_visible":"1",
"visible_size":"5",
"is_aggregate":"1",
"description":"Summe der Studierenden mit Fachsemester kleiner oder gleich der Regelstudienzeit"
}
]
/>
---ab hier nicht mehr ändern:
CREATE temp TABLE tmp_rpta_column
(
uniquename varchar(255) NOT NULL,
caption varchar(255),
srcfieldname varchar(255),
targetfieldname varchar(255),
column_type integer,
col_function text,
is_visible smallint,
visible_size smallint,
is_aggregate smallint,
resultset_id integer,
sortnr integer,
description TEXT
);
CREATE temp TABLE tmp_rpta_column_layout
(
uniquename varchar(255) NOT NULL,
caption varchar(255),
resultset_id integer,
whereclause text,
description text
);
insert into tmp_rpta_column_layout(
resultset_id,
uniquename,
caption,
whereclause,
description
)
select tid,
'${rpta_column_layout.uniquename}',
'${rpta_column_layout.caption}',
'${rpta_column_layout.whereclause}',
'${rpta_column_layout.description}'
FROM rpta_resultset
where uniquename='${rpta_column_layout.rpta_resultset}';
<#assign sortnr=0 />
<#foreach column in rpta_columns>
<#assign sortnr=sortnr +1 />
INSERT INTO tmp_rpta_column
(resultset_id,
uniquename,
caption,
srcfieldname,
targetfieldname,
column_type,
col_function,
is_visible,
visible_size,
is_aggregate,
sortnr,
description
)
select R.tid,
'${column.uniquename}',
'${column.caption}',
'${column.srcfieldname}',
<#if !column.targetfieldname?exists || column.targetfieldname=="">null::varchar <#else>'${column.targetfieldname}' </#if>,
T.tid as column_type,
'${column.col_function}',
${column.is_visible},
${column.visible_size},
${column.is_aggregate},
${sortnr*10},
'${column.description}'
FROM rpta_resultset R, rpta_column_type T
where R.uniquename='${rpta_column_layout.rpta_resultset}'
and T.uniquename='${column.column_type}';
</#foreach>
select * into temp tmp_rpta_column2layout
from rpta_column2layout
where layout_id in (select L.tid
from rpta_column_layout L,rpta_resultset R
where R.tid=L.resultset_id
and R.uniquename='${rpta_column_layout.rpta_resultset}'
and L.uniquename='${rpta_column_layout.uniquename}'
)
;
select * into temp tmp_rpta_column_layout_target
from rpta_column_layout
where resultset_id in (select tid
FROM rpta_resultset
where uniquename='${rpta_column_layout.rpta_resultset}')
and uniquename in (select uniquename from tmp_rpta_column_layout)
;
insert into rpta_column_layout
(uniquename,
caption,
resultset_id,
whereclause,
description)
select uniquename,
caption,
resultset_id,
whereclause,
description
FROM tmp_rpta_column_layout T
where 0=(select count(*) from tmp_rpta_column_layout_target T2
where T.uniquename=T2.uniquename);
drop table tmp_rpta_column_layout_target;
delete from rpta_column2layout
where layout_id in (select L.tid
from rpta_column_layout L,rpta_resultset R
where R.tid=L.resultset_id
and R.uniquename='${rpta_column_layout.rpta_resultset}'
and L.uniquename='${rpta_column_layout.uniquename}'
)
;
select * into temp tmp_rpta_column2
from tmp_rpta_column T
where (resultset_id,uniquename) not in
(select resultset_id,uniquename from rpta_column);
INSERT INTO rpta_column
(resultset_id,
uniquename,
caption,
srcfieldname,
targetfieldname,
column_type,
col_function,
is_aggregate,
description,
custom
)
select
resultset_id,
uniquename,
caption,
srcfieldname,
targetfieldname,
column_type,
col_function,
is_aggregate,
description,
0 as custom
from tmp_rpta_column2;
--evtl. neuen Satz einfügen, dann alle updaten
update rpta_column set ( caption,
srcfieldname,
targetfieldname,
column_type,
col_function,
is_aggregate,
description)
= (select caption,
srcfieldname,
targetfieldname,
column_type,
col_function,
is_aggregate,
description
from tmp_rpta_column T
where T.resultset_id=rpta_column.resultset_id
and T.uniquename=rpta_column.uniquename)
where custom=0
and (resultset_id,uniquename) in
(select T.resultset_id,T.uniquename
from tmp_rpta_column T)
;
drop table tmp_rpta_column2;
insert into rpta_column2layout(column_id,
layout_id,
sortnr,
is_visible,
visible_size,
caption,
description)
select C.tid as column_id,
L.tid as layout_id,
T.sortnr,
T.is_visible,
T.visible_size,
T.caption,
T.description
FROM rpta_column C, rpta_column_layout L, tmp_rpta_column T
where C.uniquename=T.uniquename
and C.resultset_id=T.resultset_id
and L.uniquename='${rpta_column_layout.uniquename}'
and L.resultset_id=T.resultset_id
;
drop table tmp_rpta_column;
drop TABLE tmp_rpta_column_layout;

4
src-modules/module/rpta/schluesseltabellen/rpta_column_type.unl

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
1^physicalColumn^Physische Spalte^
2^logicalColumn^Logische Spalte^
3^lookupColumn^Lookup-Spalte^
4^computedColumn^Berechnete Spalte^

3
src-modules/module/rpta/schluesseltabellen/rpta_format_code.unl

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
1^INTEGER^Ganzzahlig^::integer^
2^INT_NO_SEP^Ganzzahlig ohne 1000er Trenner^::varchar^
3^INT_PERCENT^Ganzzahlig %^::integer || ' %'^

14
src-modules/module/rpta/schluesseltabellen/sachgebiete_fuellen.sql

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
--Das Sachgebiet 331 (RPTA Administr.) wird installiert
delete from sachgebiete where tid in (331);
insert into sachgebiete(tid,name) values (331,'Qualitätssicherung Administr.');
delete from group_sachgeb_bez where sachgebiete_id in (330,331)
and groupinfo_id in (select G.tid from groupinfo G where G.name='Administratoren' or G.name='superx') ;
insert into group_sachgeb_bez
select G.tid,330 from groupinfo G where G.name='Administratoren' or G.name='superx';
insert into group_sachgeb_bez
select G.tid,331 from groupinfo G where G.name='Administratoren' or G.name='superx';

3
src-modules/module/rpta/schluesseltabellen/sachgebiete_loeschen.sql

@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
delete from sachgebiete where tid in (330,331);
delete from group_sachgeb_bez where sachgebiete_id in (330,331);
delete from user_sachgeb_bez where sachgebiete_id in (330,331);

449
src-modules/module/rpta/schluesseltabellen/studierende_datenblatt_virtuell.sql

@ -0,0 +1,449 @@ @@ -0,0 +1,449 @@
--freemarker template
<sqlvars>
<sqlvar name="sos_stg_aggr_exists">
select sp_table_exists('sos_stg_aggr') from xdummy;
</sqlvar>
<sqlvar name="fact_table_source" type="hash">
select name
from sx_tables where name ='sos_stg_aggr'
</sqlvar>
<sqlvar name="added_tables" type="hashsequence">
select 1::smallint as sortnr,
name, trim(name) ||'_' as prefix,
caption,
'dim_studiengang.tid=sos_stg_aggr.tid_stg' as joinclause
from sx_tables where name in ('dim_studiengang')
union
select 10::smallint as sortnr,
name, trim(name) ||'_' as prefix,
caption,
'dim_studiengang.stort=sos_k_stort.apnr' as joinclause
from sx_tables where name in ('sos_k_stort')
union
select 20::smallint as sortnr,
name, trim(name) ||'_' as prefix,
caption,
'sos_stg_aggr.stutyp=sos_k_stutyp.apnr' as joinclause
from sx_tables where name in ('sos_k_stutyp')
union
select 30::smallint as sortnr,
name, trim(name) ||'_' as prefix,
caption,
'sos_stg_aggr.stuart=sos_k_stuart.apnr' as joinclause
from sx_tables where name in ('sos_k_stuart')
union
select 40::smallint as sortnr,
name, trim(name) ||'_' as prefix,
caption,
'sos_stg_aggr.stufrm=sos_k_stufrm.apnr' as joinclause
from sx_tables where name in ('sos_k_stufrm')
union
select 50::smallint as sortnr,
name, trim(name) ||'_' as prefix,
caption,
'sos_stg_aggr.hrst=sos_k_hrst.apnr' as joinclause
from sx_tables where name in ('sos_k_hrst')
order by 1
</sqlvar>
<sqlvar name="fields_target" type="hashsequence"><![CDATA[
select tid, table_name,
name,
name as targetname
from sx_fields where table_name ='${fact_table_source.name}'
and currentlyused=1
<#foreach added_table in added_tables>
union
select tid,table_name,
name,
'${added_table.prefix}' || name as targetname
from sx_fields where table_name ='${added_table.name}'
and currentlyused=1
</#foreach>
order by 1
]]>
</sqlvar>
</sqlvars>
<#if sos_stg_aggr_exists==1>
<#assign fact_table_target = {"name":"sos_stud_astat", "caption":"Studierende (intern und amtlich)"}
/>
CREATE temp table tmp_tables(
name CHAR(255) ,
caption CHAR(255) ,
description CHAR(255) ,
table_type CHAR(255) ,
systeminfo_id INTEGER ,
systeminfo_orig INTEGER ,
thema CHAR(255) ,
sachgebiete_id CHAR(255)
);
CREATE temp TABLE tmp_fields(
tid serial NOT NULL,
table_name VARCHAR(255) not null,
name VARCHAR(255) not null,
caption VARCHAR(255) ,
description VARCHAR(255) ,
field_type VARCHAR(255) not null,
field_size VARCHAR(255) ,
field_not_null smallint,
currentlyused SMALLINT ,
is_primarykey SMALLINT default 0 ,
foreignkey_tab VARCHAR(255) ,
foreignkey_col VARCHAR(255) ,
foreignkey_int VARCHAR(255) ,
foreignkey_cap VARCHAR(255) ,
foreignkey_cond VARCHAR(255) ,
foreignkey_func VARCHAR(255) ,
check_integrity SMALLINT,
is_sum SMALLINT default 1,
foreignkey_uniquename VARCHAR(255)
);
--Vorbereitung:
UPDATE sx_tables
SET caption = 'Standorte'
WHERE name='sos_k_stort';
UPDATE sx_tables
SET caption = 'Studienart'
WHERE name = 'sos_k_stuart';
UPDATE sx_tables
SET caption = 'Studiumstyp'
WHERE name = 'sos_k_stutyp';
UPDATE sx_tables
SET caption = 'Studienform'
WHERE name = 'sos_k_stufrm';
UPDATE sx_tables
SET caption = 'Hörerstatus'
WHERE name = 'sos_k_hrst';
--drop view if exists sos_stud_astat;
drop VIEW sos_k_stutyp;
CREATE VIEW sos_k_stutyp
(
apnr,
druck,
astat
)
AS
SELECT cifx.apnr,
cifx.druck,
astat
FROM cifx
WHERE cifx.key = 40;
update sx_fields set
is_sum=0
where table_name='sos_stg_aggr'
and name!='summe';
update sx_fields set
is_sum=1
where table_name='sos_stg_aggr'
and name='summe';
insert into tmp_tables (
name,
caption,
description,
table_type,
systeminfo_id,
thema,
sachgebiete_id
)
select
'${fact_table_target.name}',
'${fact_table_target.caption}',
description,
table_type,
systeminfo_id,
thema,
sachgebiete_id
from sx_tables where name='${fact_table_source.name}'
;
insert into tmp_fields (table_name,
name,
caption,
description,
field_type,
field_size,
field_not_null,
currentlyused,
is_primarykey,
foreignkey_tab,
foreignkey_col,
foreignkey_int,
foreignkey_cap,
foreignkey_cond,
foreignkey_func,
check_integrity,
is_sum,
foreignkey_uniquename)
select '${fact_table_target.name}' as table_name,
name,
caption,
description,
field_type,
field_size,
field_not_null,
currentlyused,
is_primarykey,
foreignkey_tab,
foreignkey_col,
foreignkey_int,
foreignkey_cap,
foreignkey_cond,
foreignkey_func,
check_integrity,
is_sum,
foreignkey_uniquename
from sx_fields where table_name ='${fact_table_source.name}'
and currentlyused=1;
<#foreach added_table in added_tables>
insert into tmp_fields (table_name,
name,
caption,
description,
field_type,
field_size,
field_not_null,
currentlyused,
is_primarykey,
foreignkey_tab,
foreignkey_col,
foreignkey_int,
foreignkey_cap,
foreignkey_cond,
foreignkey_func,
check_integrity,
is_sum,
foreignkey_uniquename)
select '${fact_table_target.name}' as table_name,
'${added_table.prefix}' || name,
'${added_table.caption}: ' || caption,
description,
field_type,
field_size,
field_not_null,
currentlyused,
is_primarykey,
foreignkey_tab,
foreignkey_col,
foreignkey_int,
foreignkey_cap,
foreignkey_cond,
foreignkey_func,
check_integrity,
is_sum,
foreignkey_uniquename
from sx_fields where table_name ='${added_table.name}'
and currentlyused=1;
</#foreach>
CREATE temp TABLE tmp_rpta_resultset
(
caption varchar(255),
uniquename varchar(255),
fieldclause text,
joinclause text,
whereclause text,
systeminfo_id integer
);
insert into tmp_rpta_resultset(caption,
uniquename,
systeminfo_id)
select '${fact_table_target.caption}',
'${fact_table_target.name}',
7
;
update tmp_rpta_resultset set fieldclause='
<#foreach field_target in fields_target>
${field_target.table_name}.${field_target.name} as ${field_target.targetname},
</#foreach>
null::varchar as dummy',
joinclause='${fact_table_source.name}
<#foreach added_table in added_tables>
left outer join ${added_table.name} on (${added_table.joinclause})
</#foreach>';
select * into temp tmp_rs1
from rpta_resultset
;
update rpta_resultset set caption=T.caption,
fieldclause=T.fieldclause,
joinclause=T.joinclause,
whereclause=T.whereclause
from tmp_rpta_resultset T
where T.systeminfo_id=rpta_resultset.systeminfo_id
and T.uniquename=rpta_resultset.uniquename
;
insert into rpta_resultset(caption,
uniquename,
fieldclause,
joinclause,
whereclause,
systeminfo_id)
select caption,
uniquename,
fieldclause,
joinclause,
whereclause,
systeminfo_id
from tmp_rpta_resultset
where 0=(select count(*)
from tmp_rs1 T
where T.systeminfo_id=tmp_rpta_resultset.systeminfo_id
and T.uniquename=tmp_rpta_resultset.uniquename)
;
drop table tmp_rpta_resultset;
drop table tmp_rs1;
delete from sx_tables where name
in (select T.name from tmp_tables T);
insert into sx_tables (name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id)
select name,caption,description,table_type,systeminfo_id,systeminfo_orig,thema,sachgebiete_id
from tmp_tables;
delete from sx_fields where table_name
in (select T.table_name from tmp_fields T);
insert into sx_fields (table_name,name,caption,description,field_type,
field_size,
field_not_null,
currentlyUsed,
foreignkey_tab,
foreignkey_col,
foreignkey_cap,
foreignkey_int,
foreignkey_cond,
foreignkey_func,
check_integrity,
is_sum,
foreignkey_uniquename
)
select
F.table_name,F.name,F.caption,F.description,F.field_type,
F.field_size,
F.field_not_null,
F.currentlyUsed,
F.foreignkey_tab,
F.foreignkey_col,
F.foreignkey_cap,
F.foreignkey_int,
F.foreignkey_cond,
F.foreignkey_func,
F.check_integrity,
F.is_sum,
F.foreignkey_uniquename
from tmp_fields F;
drop table tmp_fields;
drop table tmp_tables;
--rpta_column füllen:
select * into temp tmp_rc1
from rpta_column;
create temp table tmp_rpta_column(
uniquename varchar(255) NOT NULL,
caption varchar(255),
srcfieldname varchar(255),
column_type integer,
col_function text,
is_aggregate smallint,
resultset_id integer,
description text,
custom integer default 0
);
insert into tmp_rpta_column( uniquename,
caption,
srcfieldname,
column_type,
col_function,
is_aggregate,
resultset_id,
description)
select F.name as uniquename,
coalesce(T.caption,T.name) || ' - ' || F.caption,
F.name as srcfieldname,
1 as column_type,
(case when F.is_sum=1 then 'sum' else null::varchar end) as col_function,
(case when F.is_sum=1 then 1 else 0 end) as is_aggregate,
R.tid as resultset_id,
F.description
from rpta_resultset R, sx_fields F left outer join sx_tables T on (T.name=F.table_name)
where F.table_name='${fact_table_target.name}'
and R.uniquename='${fact_table_target.name}'
and F.currentlyused=1
;
update rpta_column set
caption=T.caption,
srcfieldname=T.srcfieldname,
column_type=T.column_type,
col_function=T.col_function,
is_aggregate=T.is_aggregate,
resultset_id=R.tid,
description=T.description,
custom=T.custom
from tmp_rpta_column T, rpta_resultset R
where T.uniquename=rpta_column.uniquename
and rpta_column.resultset_id=R.tid
and R.uniquename='${fact_table_target.name}'
;
insert into rpta_column( uniquename,
caption,
srcfieldname,
column_type,
col_function,
is_aggregate,
resultset_id,
description,
custom)
select T.uniquename,
T.caption,
T.srcfieldname,
T.column_type,
T.col_function,
T.is_aggregate,
R.tid as resultset_id,
T.description,
T.custom
from tmp_rpta_column T, rpta_resultset R
where R.uniquename='${fact_table_target.name}'
and 0=(select count(*) from tmp_rc1 C
where C.uniquename=T.uniquename
and C.resultset_id=R.tid)
;
drop table tmp_rpta_column;
drop table tmp_rc1;
</#if> --wenn sos_stg_aggr_exists=1

17
src-modules/module/rpta/schluesseltabellen/sx_stylesheets_einfuegen.sql

@ -113,6 +113,15 @@ update sx_stylesheets set is_generic=1 @@ -113,6 +113,15 @@ update sx_stylesheets set is_generic=1
where filename in (select T.filename from tmp_stylesheets T where T.is_generic=1);
</#if>
<#if TableFieldExists?exists && TableFieldExists('sx_stylesheets','stylesheet_type')>
update sx_stylesheets set stylesheet_type=T.stylesheet_type,
contenttype=T.contenttype,
usage_resultset_data=T.usage_resultset_data,
jr_datasource=T.jr_datasource
from tmp_stylesheets T
where T.filename=sx_stylesheets.filename
and sx_stylesheets.filename in (select T2.filename from tmp_stylesheets T2);
</#if>
--delete für tml_stylesheets hinzugefügt #ak 06.03.2013
delete from tmp_stylesheets where filename in (select filename from sx_stylesheets);
@ -208,14 +217,6 @@ FROM tmp_stylesheet_field; @@ -208,14 +217,6 @@ FROM tmp_stylesheet_field;
drop table tmp_stylesheet_field;
drop table tmp_hilf;
update sx_stylesheets
set
contenttype='txt/xml',
is_generic=1,
usage_resultset_data='T',
stylesheet_type='XSL_JRXML'
where filename in ('tabelle_jrxml_a4_quer.xsl');
<#if SQLdialect='Postgres'>
select sp_update_sequence('sx_stylesheets');

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

@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
--Freemarker Template
<#if '${SQLdialect}'='Postgres' >
alter table rpta_resultset alter column fieldclause type text;
alter table rpta_resultset alter column joinclause type text;
alter table rpta_resultset alter column whereclause type text;
</#if>
--update current sos module to most recent version:
update sx_fields set is_sum=0
where table_name in ('dim_studiengang','sos_stg_aggr','sos_k_stort','sos_k_stuart','sos_k_stutyp','sos_k_stufrm')
and name !='summe';
UPDATE sx_tables
SET caption = 'Standorte'
WHERE name='sos_k_stort';
UPDATE sx_tables
SET caption = 'Studienart'
WHERE name = 'sos_k_stuart';
UPDATE sx_tables
SET caption = 'Studiumstyp'
WHERE name = 'sos_k_stutyp';
UPDATE sx_tables
SET caption = 'Studienform'
WHERE name = 'sos_k_stufrm';
CREATE OR REPLACE VIEW sos_k_stutyp
(
apnr,
druck,
astat
)
AS
SELECT cifx.apnr,
cifx.druck,
astat
FROM cifx
WHERE cifx.key = 40;
select * into temp tmp_sos_k_stutyp_astat
from sx_fields where table_name='sos_k_stutyp'
and name='astat';
INSERT INTO sx_fields
(
table_name,
name,
caption,
description,
field_type,
field_size,
field_not_null,
currentlyused,
is_primarykey,
foreignkey_tab,
foreignkey_col,
foreignkey_int,
foreignkey_cap,
foreignkey_cond,
foreignkey_func,
check_integrity,
is_sum,
foreignkey_uniquename
)
select
'sos_k_stutyp',
'astat',
'astat',
'',
'CHAR',
'150',
0,
1,
0,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
0,
1,
NULL
from xdummy
where 0=(select count(*)
from tmp_sos_k_stutyp_astat);
drop table tmp_sos_k_stutyp_astat;

64
src/de/superx/rpta/SvgProducer.java

@ -0,0 +1,64 @@ @@ -0,0 +1,64 @@
package de.superx.rpta;
public class SvgProducer {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println(SimpleBarChart("40|110",100,120,50,"#cccccc","steelblue",true));
}
/* erzeugt Datenbalken aus "_graph"-Columns, mit Maxvalue Def.
* Beispielaufruf aus JR:
* <imageExpression>net.sf.jasperreports.renderers.SimpleDataRenderer.getInstance(de.superx.rpta.SvgProducer.SimpleBarChart($F{männlich},100,149,30,"#cccccc","steelblue",false).getBytes("UTF-8"))</imageExpression>
*
*/
public static String SimpleBarChart(String barValueStr, double totalValue, double totalWidth, double height,String bgColor, String fgColor,boolean alignLeft)
{
double barValue=0;
int delim=barValueStr.indexOf("|");
if(delim!=0)
{
barValue=Double.valueOf(barValueStr.substring(0, delim));
totalValue=Double.valueOf(barValueStr.substring(delim+1));
}
else
barValue=Double.valueOf(barValueStr);
if(Double.valueOf(totalValue)==null)
totalValue=100; //percent is default
String ret = generateSvg(totalValue, totalWidth, height, bgColor, fgColor, alignLeft, barValue);
return ret;
}
/* erzeugt Datenbalken aus "_graph"-Columns, zum maxValue 100
* Beispielaufruf aus JR:
* <imageExpression>net.sf.jasperreports.renderers.SimpleDataRenderer.getInstance(de.superx.rpta.SvgProducer.SimpleBarChart($F{ Anteil Benutzer an Gesamtzahl (in %) },100,199,30,"#cccccc","steelblue",true).getBytes("UTF-8"))</imageExpression> *
*/
public static String SimpleBarChart(double barValue, double totalValue, double totalWidth, double height,String bgColor, String fgColor,boolean alignLeft)
{
if(Double.valueOf(totalValue)==null)
totalValue=100; //percent is default
String ret = generateSvg(totalValue, totalWidth, height, bgColor, fgColor, alignLeft, barValue);
return ret;
}
/* erzeugt svg-Code für Datenbalken aus "_graph"-Columns
*
*/
private static String generateSvg(double totalValue, double totalWidth, double height, String bgColor,
String fgColor, boolean alignLeft, double barValue) {
//Compute width:
double barWidth=totalWidth*(barValue/totalValue);
double x=0;
if(!alignLeft)
x=totalWidth-barWidth; //rechtsbündig
String ret="<svg xmlns=\"http://www.w3.org/2000/svg\" width=\""+totalWidth+"px\" height=\""+height+"px\">";
//background:
ret+="<g><rect x=\"0\" y=\"0\" width=\""+totalWidth+"px\" height=\""+height+"px\" fill=\""+bgColor+"\"><title>"+totalValue+"</title></rect>";
//foreground:
ret+="<rect class=\"chartBar\" width=\""+barWidth+"\" height=\""+(height-1) +"\" x=\""+x+"\" y=\"0\" rx=\"5\" ry=\"5\" fill=\""+fgColor+"\"><title>"+barValue+"</title></rect>";
ret+="</g></svg>";
return ret;
}
}

1
superx/WEB-INF/.gitignore vendored

@ -0,0 +1 @@ @@ -0,0 +1 @@
/classes/

BIN
superx/WEB-INF/lib/superx-rpta.jar

Binary file not shown.

912
superx/xml/rpta_assistent.xsl

File diff suppressed because it is too large Load Diff

140
superx/xml/rpta_templates.xsl

@ -4,6 +4,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform" @@ -4,6 +4,7 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://jasperreports.sourceforge.net/jasperreports">
<xsl:param name="font" select="'Liberation Sans'" /><!--TODO {$font} als style-->
<xsl:output method="xml" encoding="UTF-8"/>
<xsl:template name="generateJasperReport">
<xsl:param name="isMainReport" select="'true'" />
<xsl:param name="ergebniselementOrdnr" select="0" />
@ -22,7 +23,7 @@ xmlns="http://jasperreports.sourceforge.net/jasperreports"> @@ -22,7 +23,7 @@ xmlns="http://jasperreports.sourceforge.net/jasperreports">
<xsl:param name="std_spaltenbreite" select="'12'" />
<xsl:param name="std_zeilenhoehe_header" select="30" />
<xsl:param name="std_zeilenhoehe_tablerow" select="25" />
<xsl:param name="isMacroReport" select="'false'" />
<xsl:variable name="isMacroReport" select="/ergebnisse/@isMakro" />
<jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd"
name="{/ergebnisse/ergebnis[@ordnr=$ergebniselementOrdnr]/maskenname}"
@ -58,7 +59,9 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -58,7 +59,9 @@ isIgnorePagination="{$isIgnorePagination}" >
</xsl:if>
<xsl:call-template name="jr_fields" >
<xsl:with-param name="ergebniselementOrdnr" select="$ergebniselementOrdnr"/>
<xsl:with-param name="isMacroReport" select="/ergebnisse/@isMakro" />
<xsl:with-param name="isMacroReport" select="$isMacroReport" />
<xsl:with-param name="isMainReport" select="$isMainReport" />
</xsl:call-template>
@ -118,6 +121,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -118,6 +121,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:call-template name="jr_textField">
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebniselementOrdnr" />
<xsl:with-param name="fieldName" select="wert" />
<xsl:with-param name="colName" select="f_name" />
<xsl:with-param name="colId" select="@id" />
<xsl:with-param name="x" select="$columnX" />
<xsl:with-param name="width" select="$columnWidth" />
@ -132,6 +136,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -132,6 +136,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:call-template name="jr_textfield_levelx">
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebniselementOrdnr" />
<xsl:with-param name="fieldName" select="wert" />
<xsl:with-param name="colName" select="f_name" />
<xsl:with-param name="colId" select="@id" />
<xsl:with-param name="x" select="$columnX" />
<xsl:with-param name="width" select="$columnWidth" />
@ -239,11 +244,12 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -239,11 +244,12 @@ isIgnorePagination="{$isIgnorePagination}" >
</xsl:template>
<xsl:template name="jr_fields">
<xsl:param name="ergebniselementOrdnr" select="0"/>
<xsl:param name="isMainReport" />
<xsl:param name="isMacroReport" />
<field name="Berichtsname" class="java.lang.String">
<fieldDescription>
<xsl:choose>
<xsl:when test="$isMacroReport = 'true'">
<xsl:when test="$isMacroReport = 'true' and $isMainReport= 'true'">
<xsl:text><![CDATA[/ergebnisse/makro/name]]></xsl:text></xsl:when>
<xsl:otherwise><xsl:text><![CDATA[/ergebnisse/ergebnis[ @ordnr=']]></xsl:text>
<xsl:value-of select="$ergebniselementOrdnr"/>
@ -265,7 +271,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -265,7 +271,7 @@ isIgnorePagination="{$isIgnorePagination}" >
</field>
<xsl:comment> dann die Tabellenspalten </xsl:comment>
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement">
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]">
<xsl:variable name="ordnr"><xsl:value-of select="@ordnr"/></xsl:variable>
<xsl:for-each select="sqlerg/complete_headers/header">
<xsl:variable name="jasperFieldname">
@ -294,9 +300,33 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -294,9 +300,33 @@ isIgnorePagination="{$isIgnorePagination}" >
</field>
</xsl:if>
</xsl:for-each>
<!-- dann die Legende pro Unterbericht-->
<xsl:if test="$isMainReport='false'">
<xsl:for-each select="distinct-values(../completefields/feld/@varname)">
<xsl:variable name="jasperFieldname">
<xsl:call-template name="createJasperFieldname">
<xsl:with-param name="fieldName_orig" select="."/>
</xsl:call-template>
</xsl:variable>
<xsl:variable name="varname">
<xsl:value-of select="." />
</xsl:variable>
<!-- zuerst Label -->
<field name="{concat('legende_',$jasperFieldname,'_label')}" class="java.lang.String">
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis[@ordnr=]]></xsl:text><xsl:value-of select="$ordnr"/><xsl:text><![CDATA[]/completefields/feld [@varname="]]></xsl:text><xsl:value-of select="$varname"/><xsl:text><![CDATA["]/@varname]]></xsl:text></fieldDescription>
</field>
<!--dann Wert-->
<field name="{concat('legende_',$jasperFieldname,'_value')}" class="java.lang.String">
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis[@ordnr=]]></xsl:text><xsl:value-of select="$ordnr"/><xsl:text><![CDATA[]/felder/feld [@varname="]]></xsl:text><xsl:value-of select="$varname"/><xsl:text><![CDATA["]/value_caption]]></xsl:text></fieldDescription>
</field>
</xsl:for-each>
<!-- dann die Legende-->
<xsl:for-each select="distinct-values(//ergebnisse/ergebnis/completefields/feld/@varname)">
</xsl:if>
</xsl:for-each><!-- Ende Ergebniselemente -->
<!-- dann die Legende Hauptbericht-->
<xsl:if test="$isMainReport='true'">
<xsl:for-each select="distinct-values(/ergebnisse/ergebnis/completefields/feld/@varname)">
<xsl:variable name="jasperFieldname">
<xsl:call-template name="createJasperFieldname">
<xsl:with-param name="fieldName_orig" select="."/>
@ -313,8 +343,8 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -313,8 +343,8 @@ isIgnorePagination="{$isIgnorePagination}" >
<field name="{concat('legende_',$jasperFieldname,'_value')}" class="java.lang.String">
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis/felder/feld [@varname="]]></xsl:text><xsl:value-of select="$varname"/><xsl:text><![CDATA["]/value_caption]]></xsl:text></fieldDescription>
</field>
</xsl:for-each>
</xsl:if>
<!--Standatum und User:-->
<field name="standdatum" class="java.lang.String">
<fieldDescription><xsl:text><![CDATA[/ergebnisse/ergebnis[ @ordnr='0']/stand]]></xsl:text></fieldDescription>
@ -396,6 +426,8 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -396,6 +426,8 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:param name="ergebniselementOrdnr" />
<xsl:param name="colId" />
<xsl:param name="colCount" />
<xsl:param name="isLastVisibleColumInRow" />
<xsl:variable name="x"><xsl:text>0</xsl:text>
<xsl:for-each select="/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]/sqlerg/headers/header[ @width &gt; 0 and not(starts-with(f_name,'hidden')) and not(starts-with(f_name,'next')) and @id &lt; $colId ]">
<xsl:variable name="previousColumnWidth">
@ -406,6 +438,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -406,6 +438,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:with-param name="colId" select="@id" />
<xsl:with-param name="colCount" select="$colCount"/>
<xsl:with-param name="previousX" select="0"/>
<xsl:with-param name="isLastVisibleColumInRow" select="''"/>
</xsl:call-template>
</xsl:variable>
@ -425,14 +458,17 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -425,14 +458,17 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:param name="colId" />
<xsl:param name="colCount" />
<xsl:param name="previousX" />
<xsl:param name="isLastVisibleColumInRow" />
<xsl:variable name="defbreite"><xsl:value-of select="sum(/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]/sqlerg/headers/header[ @width &gt; 0 and not(starts-with(f_name,'hidden')) and not(starts-with(f_name,'next')) ]/@width )" /></xsl:variable>
<xsl:variable name="ndefbreite"><xsl:value-of select="count(/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]/sqlerg/headers/header[ @width = '' and not(starts-with(f_name,'hidden')) and not(starts-with(f_name,'next'))])" /></xsl:variable>
<xsl:variable name="gesamtbreite"><xsl:value-of select="$defbreite+($ndefbreite* $std_spaltenbreite)" /></xsl:variable>
<xsl:variable name="width"><xsl:value-of select="/ergebnisse/ergebnis/ergebniselement[@ordnr=$ergebniselementOrdnr]/sqlerg/headers/header[@id=$colId]/@width"/></xsl:variable>
<xsl:comment><xsl:value-of select="concat('defbreite=',$defbreite)" /></xsl:comment>
<xsl:choose>
<xsl:when test="($colCount - 1) =$colId ">
<!-- letzte Spalte -->
<xsl:when test="$isLastVisibleColumInRow='+' or ($colCount - 1) =$colId">
<!-- letzte Spalte wird immer vom rechten Seitenrand minus vorherige Spalten gerechnet,
weil es Rundungsfehler bei der Spaltenbreite geben kann.-->
<xsl:value-of select="$druckbreite - $previousX"/>
</xsl:when>
<xsl:when test="$width != ''">
@ -479,6 +515,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -479,6 +515,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:template name="jr_textField">
<xsl:param name="ergebnisElementOrdnr" />
<xsl:param name="fieldName" />
<xsl:param name="colName" />
<xsl:param name="colId" />
<xsl:param name="x" select="'0'" />
<xsl:param name="width" select="'0'" />
@ -503,7 +540,34 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -503,7 +540,34 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:with-param name="colId" select="$colId" />
</xsl:call-template>
</xsl:variable>
<xsl:if test="normalize-space($jasperFieldname)!=''"> <!-- keine leeren Feldnamen-->
<!--start Feldausgabe, zuerst prüfen ob besonderer Feldname-->
<xsl:choose>
<xsl:when test="normalize-space($jasperFieldname)=''"> <!-- keine leeren Feldnamen-->
</xsl:when>
<xsl:when test="starts-with($colName,'_graph')">
<xsl:variable name="alignLeft">
<xsl:choose>
<xsl:when test="starts-with($colName,'_graphbarright')">
<xsl:text>false</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>true</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<image scaleImage="RealSize" evaluationTime="Band">
<reportElement x="{$x}" y="0" width="{$width}" height="{$height}" />
<imageExpression><xsl:text><![CDATA[net.sf.jasperreports.renderers.SimpleDataRenderer.getInstance(de.superx.rpta.SvgProducer.SimpleBarChart($F{]]></xsl:text><xsl:value-of select="$jasperFieldname" />
<xsl:text>},100,</xsl:text>
<xsl:value-of select="$width"/><xsl:text>,</xsl:text>
<xsl:value-of select="$height"/><xsl:text>,"#cccccc","steelblue",</xsl:text>
<xsl:value-of select="$alignLeft"/><xsl:text>).getBytes("UTF-8"))</xsl:text></imageExpression>
</image>
</xsl:when>
<xsl:otherwise>
<!-- normales Textfeld: -->
<textField isStretchWithOverflow="true" isBlankWhenNull="true">
<reportElement stretchType="ContainerHeight" x="{$x}" y="0" width="{$width}" height="{$height}" >
<xsl:attribute name="style">
@ -533,7 +597,10 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -533,7 +597,10 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:with-param name="fieldName" select="$fieldName" />
</xsl:call-template>
</textField>
</xsl:if>
</xsl:otherwise><!-- ende normales Textfeld-->
</xsl:choose>
</xsl:template>
<xsl:template name="getFieldType">
<xsl:param name="ergebnisElementOrdnr" />
@ -582,7 +649,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -582,7 +649,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:variable name="colCount">
<xsl:choose>
<xsl:when test="($rowCounter - 1)=$rowCount">
<xsl:value-of select="$totalColCount"/>
<xsl:value-of select="$currentRowColCount"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$totalColCount"/>
@ -592,8 +659,18 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -592,8 +659,18 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:for-each select="th" >
<xsl:variable name="colId"><xsl:value-of select="position()-1" /></xsl:variable>
<xsl:if test="@isHidden='false'">
<xsl:comment><xsl:text>colId=</xsl:text><xsl:value-of select="$colId"/></xsl:comment>
<xsl:if test="@isHidden='false'">
<xsl:variable name="isLastVisibleColumInRow">
<xsl:call-template name="getLastVisibleColumInRow">
<xsl:with-param name="currentColId" select="$colId" />
<xsl:with-param name="remainingRows" select="$rowCount - ($rowCounter + 1)" />
</xsl:call-template>
</xsl:variable>
<xsl:comment><xsl:text>colId=</xsl:text><xsl:value-of select="$colId"/>
<xsl:text>
isLastVisibleColumInRow=</xsl:text><xsl:value-of select="$isLastVisibleColumInRow"/>
</xsl:comment>
<xsl:variable name="columnX">
<xsl:call-template name="getColumnX">
<xsl:with-param name="druckbreite" select="$druckbreite"/>
@ -601,6 +678,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -601,6 +678,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:with-param name="ergebniselementOrdnr" select="$ordnr"/>
<xsl:with-param name="colId" select="$colId" />
<xsl:with-param name="colCount" select="$colCount"/>
<xsl:with-param name="isLastVisibleColumInRow" select="$isLastVisibleColumInRow"/>
</xsl:call-template>
</xsl:variable>
<xsl:comment><xsl:text>columnX=</xsl:text><xsl:value-of select="$columnX"/></xsl:comment>
@ -614,6 +692,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -614,6 +692,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:with-param name="colId" select="$colId" />
<xsl:with-param name="colCount" select="$colCount"/>
<xsl:with-param name="previousX" select="$columnX"/>
<xsl:with-param name="isLastVisibleColumInRow" select="$isLastVisibleColumInRow"/>
</xsl:call-template>
</xsl:variable>
@ -639,10 +718,22 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -639,10 +718,22 @@ isIgnorePagination="{$isIgnorePagination}" >
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:variable name="computedWidth">
<!--wenn eine Spalte die letzte sichtbare ist, wird der berechnete Wert
genommen. Wenn nicht, wird mit colspan multipliziert.-->
<xsl:choose>
<xsl:when test="$isLastVisibleColumInRow='+'">
<xsl:value-of select="$columnWidth"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$columnWidth * $colspan"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<textField isStretchWithOverflow="true">
<reportElement style="TableColumnHeader" mode="Opaque" stretchType="ContainerHeight"
x="{$columnX}" y="{$y_offset+( $rowCounter * $zeilenhoehe )}" width="{$columnWidth * $colspan}" height="{$zeilenhoehe*$rowspan}" />
x="{$columnX}" y="{$y_offset+( $rowCounter * $zeilenhoehe )}" width="{$computedWidth}" height="{$zeilenhoehe*$rowspan}" />
<textFieldExpression><xsl:text>"</xsl:text>
<xsl:call-template name="newline_to_backslash_n">
<xsl:with-param name="string" select="."/>
@ -812,6 +903,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -812,6 +903,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:template name="jr_textfield_levelx">
<xsl:param name="ergebnisElementOrdnr" />
<xsl:param name="fieldName" />
<xsl:param name="colName" />
<xsl:param name="colId" />
<xsl:param name="x" />
<xsl:param name="width" />
@ -825,6 +917,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -825,6 +917,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:with-param name="tableRowLevel" select="$tableRowLevel" />
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebnisElementOrdnr" />
<xsl:with-param name="fieldName" select="$fieldName" />
<xsl:with-param name="colName" select="$colName" />
<xsl:with-param name="colId" select="$colId" />
<xsl:with-param name="x" select="$x" />
<xsl:with-param name="width" select="$width" />
@ -835,6 +928,7 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -835,6 +928,7 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:with-param name="maxLevel" select="$maxLevel"/>
<xsl:with-param name="ergebnisElementOrdnr" select="$ergebnisElementOrdnr" />
<xsl:with-param name="fieldName" select="$fieldName" />
<xsl:with-param name="colName" select="$colName" />
<xsl:with-param name="colId" select="$colId" />
<xsl:with-param name="x" select="$x" />
<xsl:with-param name="width" select="$width" />
@ -1036,4 +1130,20 @@ isIgnorePagination="{$isIgnorePagination}" > @@ -1036,4 +1130,20 @@ isIgnorePagination="{$isIgnorePagination}" >
<xsl:text disable-output-escaping="yes"><![CDATA[ +"Datenstand: "+ $F{standdatum} + "; " + "Erstellt: "+ DATEFORMAT( TODAY(), "dd.MM.YYYY")]]></xsl:text></textFieldExpression>
</textField>
</xsl:template>
<xsl:template name="getLastVisibleColumInRow">
<xsl:param name="currentColId" />
<xsl:param name="remainingRows" />
<!--ermittelt ob eine Spalte die letzte sichtbare ist
bei verknüpften Spalten ist die letzte Header-Zeile immer relevant, egal ob sichtbar oder nicht.
Zurückgegeben werden die Anzahl der sichtbaren Zellen als "+",
d.h. genau ein "+" bedeutet, dass es die letzte Spalte ist.
-->
<xsl:for-each select="../th">
<xsl:variable name="nr" select="position()" />
<xsl:if test="$nr &gt; $currentColId and (@isHidden='false' or $remainingRows=0)">
<xsl:text>+</xsl:text>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

Loading…
Cancel
Save