Skip to content
Snippets Groups Projects
Commit b7be7a55 authored by Andreas Schindlbeck's avatar Andreas Schindlbeck
Browse files

Merge branch 'master' of gitlab.adito.de:xrm/basic

parents 1c8e0974 b3054bb4
No related branches found
No related tags found
No related merge requests found
Showing
with 563 additions and 19 deletions
......@@ -449,6 +449,13 @@
<onActionProcess>%aditoprj%/entity/Org_entity/entityfields/newactivity/onActionProcess.js</onActionProcess>
<iconId>NEON:HISTORY</iconId>
</entityActionField>
<entityActionField>
<name>orgReport</name>
<fieldType>ACTION</fieldType>
<title>Customer Base Sheet</title>
<onActionProcess>%aditoprj%/entity/Org_entity/entityfields/orgreport/onActionProcess.js</onActionProcess>
<iconId>VAADIN:FILE_TEXT_O</iconId>
</entityActionField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......
import("system.vars");
import("Org_lib");
OrgUtils.openOrgReport(vars.get("$field.ORGID"));
\ No newline at end of file
......@@ -211,7 +211,7 @@
</children>
</entityOutgoingField>
<entityOutgoingField>
<name>PersComm_dfod</name>
<name>PersComm_dfo</name>
<title>Communication</title>
<fieldType>DEPENDENCY_OUT</fieldType>
<dependency>
......@@ -400,6 +400,7 @@
<entityField>
<name>REL_RELATIONSHIP</name>
<title>Relationship</title>
<description>TODO: Beziehung zu der Relation 1024846 (z.B. per Ampelsystem)</description>
<contentType>NUMBER</contentType>
<mandatory v="false" />
<valueProcess>%aditoprj%/entity/Pers_entity/entityfields/rel_relationship/valueProcess.js</valueProcess>
......
......@@ -192,6 +192,10 @@ See RelationUtils.getRelationTypeByPersOrg for possible values</description>
<name>STANDARD_PHONE_COMM</name>
<title>Phone</title>
</entityField>
<entityField>
<name>RELATIONSHIP</name>
<description>TODO: Beziehung zu der Relation 1024846 (z.B. per Ampelsystem)</description>
</entityField>
</entityFields>
<recordContainers>
<dbRecordContainer>
......@@ -289,6 +293,10 @@ See RelationUtils.getRelationTypeByPersOrg for possible values</description>
<name>STANDARD_PHONE_COMM.value</name>
<expression>%aditoprj%/entity/Relation_entity/recordcontainers/db/recordfieldmappings/standard_phone_comm.value/expression.js</expression>
</dbRecordFieldMapping>
<dbRecordFieldMapping>
<name>RELATIONSHIP.value</name>
<recordfield>RELATION.RELATIONSHIP</recordfield>
</dbRecordFieldMapping>
</recordFieldMappings>
</dbRecordContainer>
</recordContainers>
......
......@@ -119,6 +119,7 @@
</entityField>
<entityField>
<name>RELATION_RELATIONSHIP</name>
<description>TODO: Beziehung zu der Relation 1024846 (z.B. per Ampelsystem)</description>
</entityField>
<entityFieldGroup>
<name>resultingRelation_fieldGroup</name>
......
......@@ -1279,7 +1279,10 @@
<key>Plus Salestax</key>
</entry>
<entry>
<key>maturity date</key>
<key>Choose address</key>
</entry>
<entry>
<key>Customer Base Sheet</key>
</entry>
<entry>
<key>{$TASK_STATUS}</key>
......@@ -1308,9 +1311,6 @@
<entry>
<key>priority</key>
</entry>
<entry>
<key>Choose address</key>
</entry>
<entry>
<key>zusagen</key>
</entry>
......@@ -1413,6 +1413,30 @@
<entry>
<key>Angebot</key>
</entry>
<entry>
<key>responsible</key>
</entry>
<entry>
<key>maturity date</key>
</entry>
<entry>
<key>Contact type</key>
</entry>
<entry>
<key>Communication data</key>
</entry>
<entry>
<key>Remark</key>
</entry>
<entry>
<key>Department</key>
</entry>
<entry>
<key>Tasks</key>
</entry>
<entry>
<key>Employee</key>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
<sqlModels>
......
......@@ -38,6 +38,10 @@
<key>Show all contracts</key>
<value>Alle Verträge anzeigen</value>
</entry>
<entry>
<key>Communication data</key>
<value>Kommunikationsdaten</value>
</entry>
<entry>
<key>Male</key>
<value>Männlich</value>
......@@ -210,6 +214,10 @@
<key>Addresses</key>
<value>Adressen</value>
</entry>
<entry>
<key>Contact type</key>
<value>Kontaktart</value>
</entry>
<entry>
<key>${COMM_ADDRESS}</key>
<value>Adresse</value>
......@@ -400,6 +408,10 @@
<key>Valid until</key>
<value>gültig bis</value>
</entry>
<entry>
<key>Department</key>
<value>Abteilung</value>
</entry>
<entry>
<key>Price list</key>
<value>Preisliste</value>
......@@ -512,6 +524,10 @@
<key>Kgs</key>
<value>Kg</value>
</entry>
<entry>
<key>Employee</key>
<value>Mitarbeiter</value>
</entry>
<entry>
<key>CHF</key>
<value>CHF</value>
......@@ -1104,6 +1120,10 @@
<key>Document</key>
<value>Dokument</value>
</entry>
<entry>
<key>Remark</key>
<value>Anmerkung</value>
</entry>
<entry>
<key>Competition</key>
<value>Mitbewerber</value>
......@@ -1221,6 +1241,10 @@
<entry>
<key>Budget (Project)</key>
</entry>
<entry>
<key>responsible</key>
<value>verantwortlich</value>
</entry>
<entry>
<key>Show all Facebook posts of a user</key>
<value>Alle Facebook Beiträge eines Benutzers anzeigen</value>
......@@ -1375,6 +1399,7 @@
</entry>
<entry>
<key>Relationship</key>
<value></value>
</entry>
<entry>
<key>${BINARY_LIB_TOO_MANY_BINARIES}</key>
......@@ -1416,6 +1441,10 @@
<key>Offer report</key>
<value>Angebotsbericht</value>
</entry>
<entry>
<key>Tasks</key>
<value>Aufgaben</value>
</entry>
<entry>
<key>New offer</key>
<value>Angebot erstellen</value>
......@@ -1585,6 +1614,10 @@
<key>Take price</key>
<value>Preis übernehmen</value>
</entry>
<entry>
<key>Customer Base Sheet</key>
<value>Kundenstammblatt</value>
</entry>
<entry>
<key>Twitter Feed</key>
</entry>
......
......@@ -1296,7 +1296,10 @@
<key>Plus Salestax</key>
</entry>
<entry>
<key>maturity date</key>
<key>Choose address</key>
</entry>
<entry>
<key>Customer Base Sheet</key>
</entry>
<entry>
<key>{$TASK_STATUS}</key>
......@@ -1325,9 +1328,6 @@
<entry>
<key>priority</key>
</entry>
<entry>
<key>Choose address</key>
</entry>
<entry>
<key>zusagen</key>
</entry>
......@@ -1430,6 +1430,30 @@
<entry>
<key>Angebot</key>
</entry>
<entry>
<key>responsible</key>
</entry>
<entry>
<key>maturity date</key>
</entry>
<entry>
<key>Contact type</key>
</entry>
<entry>
<key>Communication data</key>
</entry>
<entry>
<key>Remark</key>
</entry>
<entry>
<key>Department</key>
</entry>
<entry>
<key>Tasks</key>
</entry>
<entry>
<key>Employee</key>
</entry>
</keyValueMap>
<font name="Dialog" style="0" size="11" />
</language>
......@@ -3,7 +3,7 @@
<name>Org_lib</name>
<majorModelMode>DISTRIBUTED</majorModelMode>
<process>%aditoprj%/process/Org_lib/process.js</process>
<alias>_____SYSTEMALIAS</alias>
<alias>Data_alias</alias>
<variants>
<element>LIBRARY</element>
</variants>
......
import("system.datetime");
import("system.translate");
import("system.db");
import("Binary_lib");
import("Report_lib");
import("Sql_lib");
import("Keyword_lib");
import("PostalAddress_lib");
/**
* a static Utility class for the Org context.
......@@ -42,3 +49,145 @@ OrgUtils.removeImage = function(pOrgId)
{
return ImageUtils.remove("ORG", "IMAGE", pOrgId);
}
/**
* opens the org-report
*
* @param {String} pOrgId the id of the organization
*/
OrgUtils.openOrgReport = function(pOrgId)
{
var relationId = pOrgId;
//org info
var info = db.cell(SqlCondition.begin()
.andPrepare("ORG.ORGID", pOrgId)
.buildSelect("select ORG.INFO from ORG"));
//communication data of the organization
var commSql = "select MEDIUM_ID, ADDR from COMM";
commSql = SqlCondition.begin()
.andPrepare("COMM.RELATION_ID", relationId)
.and("STANDARD = 1")
.buildSelect(commSql);
var commData = db.table(commSql);
//resolve keyword
commData.forEach(function (row)
{
row[0] = KeywordUtils.getViewValue("COMM.MEDIUM", row[0]);
});
commData = ReportData.begin(["KINDOFCOMM", "COMMVALUE"]).add(commData);
//select people from the organization
//TODO: Position und Abteilung fehlen noch
var persSql = "select SALUTATION, TITLE, FIRSTNAME, LASTNAME, '', '', '', ORG_ID, RELATIONID"
+ " from PERS join RELATION on PERSID = PERS_ID";
persSql = SqlCondition.begin()
.andPrepare("RELATION.ORG_ID", pOrgId)
.and("RELATION.STATUS = 1")
.buildSelect(persSql, "", " order by PERS.LASTNAME asc");
var persData = db.table(persSql);
//TODO: get the keywords in another way when keywords are entitys
var mediumIds = [];
var mediums = KeywordUtils.getStandardArrayProps("COMM.MEDIUM");
for (let i = 0; i < mediums.length; i++)
if ("category" in mediums[i][2] && (mediums[i][2].category == "PHONE" || mediums[i][2].category == "EMAIL"))
mediumIds.push(mediums[i][0]);
mediums = mediumIds.join(", ");
for (let i = 0; i < persData.length; i++)
{
_joinArrayVals(persData[i], 0, 4); //join the full name together
//select the contact info for every person for phone and mail
var persCommSql = "select MEDIUM_ID, ADDR from COMM";
persCommSql = SqlCondition.begin()
.andPrepare("COMM.RELATION_ID", persData[i][5])
.and("MEDIUM_ID in (" + mediumIds + ")")
.and("STANDARD = 1")
.buildSelect(persCommSql);
var persDataComm = db.table(persCommSql);
//resolve keyword
persData[i][3] = persDataComm.map(function (row)
{
return KeywordUtils.getViewValue("COMM.MEDIUM", row[0]) + ": " + row[1];
}
).join("\n");
}
persData = ReportData.begin(["PERSNAMECOMPLETE", "PERSFUNCTION", "PERSDEPARTMENT", "PERSCOMM", "ORG_ID", "RELATION_ID"]).add(persData);
var histSql = "select ENTRYDATE, CATEGORY, FIRSTNAME, LASTNAME, INFO from ACTIVITY "
+ " join ACTIVITYLINK on ACTIVITYLINK.ACTIVITY_ID = ACTIVITYID "
+ " join RELATION on ACTIVITYLINK.ROW_ID = RELATIONID"
+ " left join PERS on RELATION.PERS_ID = PERSID";
histSql = SqlCondition.begin()
.andPrepare("RELATION.ORG_ID", pOrgId) //= all activities linked to the organization or an employee
.buildSelect(histSql, "", "order by ENTRYDATE desc");
var histData = db.table(histSql);
var dateFormat = translate.text("dd.MM.yyyy");
histData.forEach(function (row)
{
row[0] = datetime.toDate(row[0], dateFormat);
row[1] = KeywordUtils.getViewValue("ACTIVITY.CATEGORY", row[1]);
_joinArrayVals(row, 2, 2);
});
histData = ReportData.begin(["ENTRYDATE", "MEDIUM", "LOGIN", "INFO"]).add(histData);
var attr = ""; //TODO: this should be a string with the attributes
//tasks
var taskSql = "select TASK.SUBJECT, TASK.DESCRIPTION, TASK.STATUS, FIRSTNAME, LASTNAME from TASK"
+ " join RELATION on EDITOR_RELATION_ID = RELATIONID"
+ " left join PERS on RELATION.PERS_ID = PERSID";
taskSql = SqlCondition.begin()
.andPrepare("RELATION.ORG_ID", pOrgId)
.buildSelect(taskSql);
var taskData = db.table(taskSql);
taskData.forEach(function (row)
{
row[2] = KeywordUtils.getViewValue("TASK.STATUS", row[2]);
_joinArrayVals(row, 3, 2); //join FIRSTNAME and LASTNAME together
});
taskData = ReportData.begin(["SUBJECT", "INFOTEXT", "STATUS", "RESPONSIBLE"]).add(taskData);
var params = {
"ORGAddr" : AddressUtils.getAddress(relationId).toString(), //TODO: use new address logic when available
"ORGAttr" : attr,
"INFO" : info
};
var orgReport = new Report("RPTJ_ORG", params);
//add subreport data
orgReport.addSubReportData("subdataComm", commData);
orgReport.addSubReportData("subdataPers", persData);
orgReport.addSubReportData("subdataHist", histData);
orgReport.addSubReportData("subdataTask", taskData);
//add logo
//TODO: use an function to get the image when available
var imgData = [
"meineFirma | Konrad-Zuse-Straße 4 | DE 84144 Geisenhausen",
"base64:iVBORw0KGgoAAAANSUhEUgAAAM4AAABRCAYAAACaL5lSAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhc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uRqcN8Zi5faGsWaSlnIlAw9yOS1vQIIEjmDb7frkogwMOcNWGTPnNMGl7O8zknYsX/UA+76p2NpcGB/93WBslzugFn+QTzapMWsqZMPLW/sI9ae7l3ToOChxxq2UO0HfEXjXpegAMZX118aKFNwM2SvjAqzXqUvRohPi/tdkv4khLORPU64yoONxjHNyVsD7MbUU5rzd67Nr/eqU8+8UOp2Sf/VbsiN/CU0deYKsioVgQIs9RsUMpqNshLSshkRPmZR23tFF+L7bPJG/69hsqmKNaVkISIRxHPHCBvhHbk6CAwaSOw47x0JIkCscBDfRzU76frdnTuSNcPqRBDEISLRyjDfWSKUdzMCV6o+edQagcF2hPmOzf4UAyJByn8R405bsMMCU6ZneO+8bQf5nyfXSnzdznawhJhXAcxtQQL8fszpioNurnefCMEB53wJ3bvDpOMiEch7NqGHNgotpOU54+MOw7DPCOgHMqSjyEdpmHjmRROA6X1YZ07IPpAzETGqJwmJ8GU21g1gAnpI1QMt6wiZcF4r1niJLhbTQfcfxCkkQuyFwghJDZLOAuIITCIYTCIYTCIYTCIYTCIYRQOIRQOIRQOIRQOIRQOISQWvi/AAMA9UczDEaG0p8AAAAASUVORK5CYII="
];
params["myAddr"] = imgData[0];
orgReport.addImage("myLogo", imgData[1]);
orgReport.openReport();
/*
* merges multiple columns in an two-dimensional array into one
*/
function _joinArrayVals (pArr, pIndex, pHowMany)
{
pArr.splice(pIndex, pHowMany,
pArr.slice(pIndex, pIndex + pHowMany)
.filter(function (val) {return val;}).join(" "));
}
}
\ No newline at end of file
......@@ -19,16 +19,17 @@ import("system.vars");
* logging.log(reportData.getReportData().toSource());<br>
*
* @class
* @param {Array} [pFieldNames=[]] the report fieldnames as an array
*/
function ReportData(pFieldNames)
{
this._reportFields = pFieldNames;
this._reportFields = pFieldNames || [];
this._reportValues = [];
}
/**
* create a new ReportData instance.
* @param {String[]} pFieldNames the names of all fields as array
* @param {String[]} [pFieldNames=[]] the names of all fields as array
*
* @return {ReportData} this
*/
......@@ -83,14 +84,16 @@ ReportData.prototype.getReportValues = function()
/**
* create a Report
* @param {String} pReportName
* @param {Object} [pReportParams=null] the params for the report
* @param {ReportData} [pReportData=null] the data for the report
*
* @class
*/
function Report(pReportName)
function Report(pReportName, pReportParams, pReportData)
{
this.reportName = pReportName;
this.reportParams = null;
this.reportData = new ReportData();
this.reportParams = pReportParams || null;
this.reportData = pReportData || null;
}
/**
......@@ -186,7 +189,7 @@ Report.prototype.exportReport = function(pFilename, pCondition, pExportFormat, p
if (pCondition == undefined) pCondition = "";
if (pWhereOrder == undefined) pWhereOrder = null;
var doc = [pFilename, report.exportToBytes(this.reportName, pCondition, pExportFormat, pWhereOrder, this.reportParams, this.reportData.getReportFields(), this.reportData.getReportValues(), pLanguage)];
var doc = [pFilename, report.exportToBytes(this.reportName, pCondition, pExportFormat, pWhereOrder, this.reportParams, this._getReportDataFields(), this._getReportDataValues(), pLanguage)];
return doc;
}
......@@ -198,10 +201,10 @@ Report.prototype.exportReport = function(pFilename, pCondition, pExportFormat, p
* @return {Array} [filename, data_bytes]
*/
Report.prototype.openReport = function(pCondition, pVariables) {
if (pCondition == undefined) pCondition = "";
if (pCondition == undefined) pCondition = null;
if (pVariables == undefined) pVariables = null;
neon.openReport(this.reportName, pCondition, this.reportParams, this.reportData.getReportFields(), this.reportData.getReportValues(), pVariables);
neon.openReport(this.reportName, pCondition, this.reportParams, this._getReportDataFields(), this._getReportDataValues(), pVariables);
return this;
}
......@@ -231,4 +234,28 @@ Report.prototype._getSubReportMap = function(pFieldNames, pData)
}
return data;
}
}
/**
* gets the fields of the reportData of this report or null if reportData is null
*
* @return {Array} report fields or null
*/
Report.prototype._getReportDataFields = function()
{
if (this.reportData != null)
return this.reportData.getReportFields();
return null;
}
/**
* gets the values of the reportData of this report or null if reportData is null
*
* @return {Array} report values or null
*/
Report.prototype._getReportDataValues = function()
{
if (this.reportData != null)
return this.reportData.getReportValues();
return null;
}
\ No newline at end of file
......@@ -24,7 +24,7 @@
<parameter name="OFFERDel" class="java.lang.String"/>
<parameter name="AD_Name" class="java.lang.String"/>
<parameter name="SUBREPORT_DIR" class="java.lang.String" isForPrompting="false">
<defaultValueExpression><![CDATA["C:\\entwicklungszweige\\0.0\\project\\xRM-Basic5.1\\report\\RPTJ_OFFER\\"]]></defaultValueExpression>
<defaultValueExpression><![CDATA["C:\\entwicklungszweige\\0.0\\project\\xRM-Basic2019\\report\\RPTJ_OFFER\\"]]></defaultValueExpression>
</parameter>
<parameter name="adito.datasource.subdata" class="java.lang.Object"/>
<parameter name="SUMITEMSUM" class="java.lang.Double"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<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="Aufgaben" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="85abee76-0173-491f-84c2-385ecdce25bb">
<property name="ireport.zoom" value="1.6105100000000008"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<field name="STATUS" class="java.lang.String"/>
<field name="SUBJECT" class="java.lang.String"/>
<field name="CREATEDBY" class="java.lang.String"/>
<field name="RESPONSIBLE" class="java.lang.String"/>
<field name="INFOTEXT" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="16" splitType="Stretch">
<textField>
<reportElement x="3" y="0" width="102" height="15" uuid="f4c173de-6106-4330-87c2-b2ce021394ed"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{SUBJECT}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement x="118" y="0" width="168" height="15" uuid="389fc04e-a659-4ef9-923c-3ff73f5bfd18"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{INFOTEXT}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="296" y="0" width="104" height="15" uuid="e8c8b469-8f88-47f0-8056-4a3fe23fd6e5"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{STATUS}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="445" y="0" width="100" height="15" uuid="fd1db5d1-8dc3-43ba-a723-da731405325c"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{RESPONSIBLE}]]></textFieldExpression>
</textField>
</band>
<band height="5">
<line>
<reportElement x="0" y="1" width="555" height="1" uuid="1259315f-6fe1-4e0c-bc4a-81208ef427c6"/>
<graphicElement>
<pen lineWidth="0.75" lineStyle="Dotted"/>
</graphicElement>
</line>
</band>
</detail>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<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="Historien" pageWidth="555" pageHeight="572" orientation="Landscape" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="4066531c-fd6e-4cc9-a763-20a1023e8349">
<property name="ireport.zoom" value="1.2100000000000004"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<field name="ENTRYDATE" class="java.lang.String"/>
<field name="MEDIUM" class="java.lang.String"/>
<field name="LOGIN" class="java.lang.String"/>
<field name="INFO" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="17" splitType="Stretch">
<textField>
<reportElement x="0" y="1" width="100" height="15" uuid="fc8f2d06-0eb7-4fd0-a91c-cda7a85dd06e"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{ENTRYDATE}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="103" y="1" width="100" height="15" uuid="d76859d9-0766-497e-9187-33ce879dc4f3"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{MEDIUM}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="222" y="1" width="91" height="15" uuid="df383fa6-a716-4f3c-ac97-d2beb7c329ac"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{LOGIN}]]></textFieldExpression>
</textField>
<textField isStretchWithOverflow="true">
<reportElement x="345" y="1" width="116" height="15" uuid="dd8ad103-b2e2-4fad-afea-81854bf12e47"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{INFO}]]></textFieldExpression>
</textField>
</band>
<band height="4">
<line>
<reportElement x="0" y="2" width="555" height="1" uuid="f895ff04-ead0-48c3-85c1-5f6772d79ab3"/>
<graphicElement>
<pen lineWidth="0.75" lineStyle="Dotted"/>
</graphicElement>
</line>
</band>
</detail>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<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="Kommunikationsdaten" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="c659b407-943a-4427-8fa5-032bff204ff4">
<property name="ireport.zoom" value="1.6105100000000008"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<field name="KINDOFCOMM" class="java.lang.String"/>
<field name="COMMVALUE" class="java.lang.String"/>
<field name="CLIENTID" class="java.lang.String"/>
<field name="ORG_ID" class="java.lang.String"/>
<field name="RELATION_ID" class="java.lang.String"/>
<field name="COMMDATA" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="16" splitType="Stretch">
<textField>
<reportElement x="0" y="1" width="100" height="15" uuid="c356083f-2a5e-4a3e-9b08-c7baf2b1381e"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{KINDOFCOMM}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="103" y="1" width="100" height="15" uuid="48bf1f6b-953a-44b6-9ebf-504203afa70d"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{COMMVALUE}]]></textFieldExpression>
</textField>
</band>
<band height="6">
<line>
<reportElement x="0" y="2" width="555" height="1" uuid="632ccf1b-5e1c-49b6-9332-e9992b53e878"/>
<graphicElement>
<pen lineWidth="0.75" lineStyle="Dotted"/>
</graphicElement>
</line>
</band>
</detail>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<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="Kommunikationsdaten" pageWidth="555" pageHeight="802" columnWidth="555" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="c659b407-943a-4427-8fa5-032bff204ff4">
<property name="ireport.zoom" value="1.6105100000000008"/>
<property name="ireport.x" value="0"/>
<property name="ireport.y" value="0"/>
<field name="PERSNAMECOMPLETE" class="java.lang.String"/>
<field name="PERSFUNCTION" class="java.lang.String"/>
<field name="PERSDEPARTMENT" class="java.lang.String"/>
<field name="PERSCOMM" class="java.lang.String"/>
<field name="CLIENTID" class="java.lang.String"/>
<field name="ORG_ID" class="java.lang.String"/>
<field name="RELATION_ID" class="java.lang.String"/>
<field name="COMMDATA" class="java.lang.String"/>
<background>
<band splitType="Stretch"/>
</background>
<detail>
<band height="16" splitType="Stretch">
<textField isStretchWithOverflow="true">
<reportElement x="345" y="1" width="116" height="15" uuid="4186db31-3a25-43f2-ae39-abca90ded430"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{PERSCOMM}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="0" y="1" width="100" height="15" uuid="c356083f-2a5e-4a3e-9b08-c7baf2b1381e"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{PERSNAMECOMPLETE}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="222" y="1" width="91" height="15" uuid="03d2241a-2aa6-4dbf-bad7-94c48837eae6"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{PERSDEPARTMENT}]]></textFieldExpression>
</textField>
<textField>
<reportElement x="103" y="1" width="100" height="15" uuid="48bf1f6b-953a-44b6-9ebf-504203afa70d"/>
<textElement>
<font fontName="Segoe UI" size="8"/>
</textElement>
<textFieldExpression><![CDATA[$F{PERSFUNCTION}]]></textFieldExpression>
</textField>
</band>
<band height="6">
<line>
<reportElement x="0" y="2" width="555" height="1" uuid="632ccf1b-5e1c-49b6-9332-e9992b53e878"/>
<graphicElement>
<pen lineWidth="0.75" lineStyle="Dotted"/>
</graphicElement>
</line>
</band>
</detail>
</jasperReport>
<?xml version="1.0" encoding="UTF-8"?>
<report xmlns="http://www.adito.de/2018/ao/Model" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" VERSION="1.1.5" xsi:schemaLocation="http://www.adito.de/2018/ao/Model adito://models/xsd/report/1.1.5">
<name>RPTJ_ORG</name>
<title>Kundenstammblatt</title>
<description></description>
<majorModelMode>DISTRIBUTED</majorModelMode>
<icon>%aditoprj%/report/RPTJ_ORG/icon.png</icon>
<iconInactive>%aditoprj%/report/RPTJ_ORG/iconInactive.png</iconInactive>
<reportData>%aditoprj%/report/RPTJ_ORG/reportData.jrxml</reportData>
<reportType>JASPER</reportType>
<subReports>
<subreport>
<name>Kontaktpersonen</name>
<reportData>%aditoprj%/report/RPTJ_ORG/Kontaktpersonen.jrxml</reportData>
</subreport>
<subreport>
<name>Historien</name>
<reportData>%aditoprj%/report/RPTJ_ORG/Historien.jrxml</reportData>
</subreport>
<subreport>
<name>Aufgaben</name>
<reportData>%aditoprj%/report/RPTJ_ORG/Aufgaben.jrxml</reportData>
</subreport>
<subreport>
<name>Kommunikationsdaten</name>
<reportData>%aditoprj%/report/RPTJ_ORG/Kommunikationsdaten.jrxml</reportData>
</subreport>
</subReports>
<images>
<image>
<name>myLogo</name>
<fileName>myLogo.png</fileName>
<imageData>%aditoprj%/report/RPTJ_ORG/myLogo.png</imageData>
</image>
<image>
<name>icon</name>
<fileName>icon.png</fileName>
<imageData>%aditoprj%/report/RPTJ_ORG/icon.png</imageData>
</image>
<image>
<name>iconInactive</name>
<fileName>iconInactive.png</fileName>
<imageData>%aditoprj%/report/RPTJ_ORG/iconInactive.png</imageData>
</image>
</images>
<ribbon>
<name>ribbon</name>
<ribbonTasks>
<ribbonTask>
<name>TASK_REPORT</name>
<showNavigationBar v="true" />
<showZoom v="true" />
<showExport v="true" />
<showAux v="true" />
<icon>REPORT_24</icon>
<enabled v="true" />
<layoutPosition>POSITION_TOP</layoutPosition>
</ribbonTask>
</ribbonTasks>
</ribbon>
</report>
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment