Hello together,
first I'd like to excuse my bad english. It's also the first time for me writing here.
To my situation: A costumer who runs daily/weekly/monthly reports of a Cisco Cisco Unified Contact Center Express (UCCX) wants us to rework an old report for CSV Export. I had to re-work an already existing report that was done by a collegue who's not working here anymore. He wrote the report undocumented unfortunately. Now the issue i have with this is, that the dates are queried as to_char and its displayed as we need it for one column (d.m.Y) but we need the same information spouting out a different format because the costumer also wants the name of the day in a different column. So far i have not found a way to change the expression (it outright ignores my Pattern of EEEE). The Field i'm talking about is the "Wochentag" which should display depending on the date "Monday, Tuesday..." and so on. They'd also like to display the week number (which i have not figured out as of yet how to do that).
I'd really appreciate it if somebody could help me point into the right direction of how to change the as far as i understood String Value of the date into the desired Pattern.
with best regards
Peter
<queryString> <![CDATA[SELECT ContactCallDetail.contacttype AS Type, ContactCallDetail.contactDisposition, TO_CHAR(extend(ContactCallDetail.startDateTime) + 1 units hour, '%d.%m.%Y') AS Date, TO_CHAR(extend(ContactCallDetail.startDateTime) + 1 units hour, '%H:00') AS Time, TO_CHAR(extend(ContactCallDetail.startDateTime) + 1 units hour, '%H:%M:%S') AS Time2, ContactCallDetail.sessionID AS SessionID, ContactCallDetail.CustomVariable9 AS BusinessHour, ContactCallDetail.CustomVariable10 AS Redirect, ContactCallDetail.callednumber AS Called, contactqueuedetail.disposition, contactqueuedetail.queueTime AS ZeitInQueue, AgentConnectionDetail.talktime AS SprechZeit, AgentConnectionDetail.worktime AS Nachbearbeitung, AgentConnectionDetail.holdtime AS Holdtime, AgentConnectionDetail.talktime + AgentConnectionDetail.worktime + AgentConnectionDetail.Holdtime AS kontaktzeit, AgentConnectionDetail.talktime + AgentConnectionDetail.Holdtime AS TalkT FROM contactqueuedetail contactqueuedetail FULL JOIN contactcalldetail contactcalldetail ON contactqueuedetail.sessionid=contactcalldetail.sessionid LEFT OUTER JOIN agentconnectiondetail agentconnectiondetail ON contactqueuedetail.sessionid = agentconnectiondetail.sessionid WHERE TO_CHAR(extend(SYSDATE) -24 units hour, '%d.%m.%Y') = TO_CHAR(ContactCallDetail.startDateTime, '%d.%m.%Y') AND ContactCallDetail.callednumber=1800 /* nur für SC 1800 */ ORDER BY 4]]> </queryString> <field name="type" class="java.lang.Short"/> <field name="contactdisposition" class="java.lang.Short"/> <field name="date" class="java.lang.String"/> <field name="time" class="java.lang.String"/> <field name="time2" class="java.lang.String"/> <field name="sessionid" class="java.math.BigDecimal"/> <field name="businesshour" class="java.lang.String"/> <field name="redirect" class="java.lang.String"/> <field name="called" class="java.lang.String"/> <field name="disposition" class="java.lang.Short"/> <field name="zeitinqueue" class="java.lang.Short"/> <field name="sprechzeit" class="java.lang.Short"/> <field name="nachbearbeitung" class="java.lang.Short"/> <field name="holdtime" class="java.lang.Short"/> <field name="kontaktzeit" class="java.math.BigDecimal"/> <field name="talkt" class="java.math.BigDecimal"/> <variable name="kontaktzeit_1" class="java.math.BigDecimal" resetType="Column" calculation="Average"> <variableExpression><![CDATA[$F{kontaktzeit}]]></variableExpression> </variable> <variable name="sprechzeit_1" class="java.lang.Short" resetType="Column" calculation="Average"> <variableExpression><![CDATA[$F{sprechzeit}]]></variableExpression> </variable> <variable name="zeitinqueue_1" class="java.lang.Short" resetType="Group" resetGroup="Time" calculation="Average"> <variableExpression><![CDATA[$F{zeitinqueue}]]></variableExpression> </variable> <variable name="nachbearbeitung_1" class="java.lang.Short" resetType="Column" calculation="Average"> <variableExpression><![CDATA[$F{nachbearbeitung}]]></variableExpression> </variable> <variable name="zeitinqueue_2" class="java.lang.Short" resetType="Group" resetGroup="Time" calculation="Highest"> <variableExpression><![CDATA[$F{zeitinqueue}]]></variableExpression> </variable> <variable name="sprechzeit_2" class="java.lang.Short" resetType="Column" calculation="Highest"> <variableExpression><![CDATA[$F{sprechzeit}]]></variableExpression> </variable> <variable name="nachbearbeitung_2" class="java.lang.Short" resetType="Column" calculation="Highest"> <variableExpression><![CDATA[$F{nachbearbeitung}]]></variableExpression> </variable> <variable name="kontaktzeit_2" class="java.math.BigDecimal" resetType="Column" calculation="Highest"> <variableExpression><![CDATA[$F{kontaktzeit}]]></variableExpression> </variable> <variable name="type_1" class="java.lang.Short" resetType="Group" resetGroup="Time" calculation="Count"> <variableExpression><![CDATA[$F{type}]]></variableExpression> </variable> <variable name="disposition_1" class="java.lang.Integer" resetType="Group" resetGroup="Uhrzeit" incrementType="Group" incrementGroup="date" calculation="Count"> <variableExpression><![CDATA["!"]]></variableExpression> <initialValueExpression><![CDATA[0]]></initialValueExpression> </variable> <variable name="nachbearbeitung_3" class="java.lang.Short" resetType="Group" resetGroup="Time" calculation="Average"> <variableExpression><![CDATA[$F{nachbearbeitung}]]></variableExpression> </variable> <variable name="nachbearbeitung_4" class="java.lang.Short" resetType="Column" calculation="Highest"> <variableExpression><![CDATA[$F{nachbearbeitung}]]></variableExpression> </variable> <variable name="SumAbandonedCallPerTimeInt" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[($F{disposition}.intValue() == 1) ? 1 : 0]]></variableExpression> <initialValueExpression><![CDATA[]]></initialValueExpression> </variable> <variable name="SumHandledCallsPerTimeInt" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[($F{disposition}.intValue() == 2) ? 1 : 0]]></variableExpression> </variable> <variable name="SumRedirectCallPerTimeInt" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 4) || ($F{disposition}.intValue() == 3) ) ? 1 : 0]]></variableExpression> <initialValueExpression><![CDATA[]]></initialValueExpression> </variable> <variable name="InboundCallTimeInt" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Count"> <variableExpression><![CDATA[$F{time}]]></variableExpression> </variable> <variable name="Annahmerate" class="java.lang.Float"> <variableExpression><![CDATA[($V{SumHandledCallsPerTimeInt}+$V{SumRedirectCallPerTimeInt}) /$V{InboundCallTimeInt}]]></variableExpression> </variable> <variable name="type_2" class="java.lang.Short" resetType="Group" resetGroup="date" calculation="Count"> <variableExpression><![CDATA[$F{type}]]></variableExpression> </variable> <variable name="SumHandledCallsPerDayInt" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[($F{disposition}.intValue() == 2) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallPerDayInt" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[($F{disposition}.intValue() == 1) ? 1 : 0]]></variableExpression> <initialValueExpression><![CDATA[]]></initialValueExpression> </variable> <variable name="SumRedirectCallPerDayInt" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 4) || ($F{disposition}.intValue() == 3) ) ? 1 : 0]]></variableExpression> <initialValueExpression><![CDATA[]]></initialValueExpression> </variable> <variable name="Annahmerate_Day" class="java.lang.Float"> <variableExpression><![CDATA[($V{SumHandledCallsPerDayInt}+$V{SumRedirectCallPerDayInt}) /$V{type_2}]]></variableExpression> </variable> <variable name="SumHandledCallsPerTimeInt_Int1" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() < 11) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumHandledCallsPerTimeInt_Int2" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() >= 11) && ($F{zeitinqueue}.intValue() <= 30) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumHandledCallsPerTimeInt_Int3" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() >= 31) && ($F{zeitinqueue}.intValue() <= 60) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumHandledCallsPerTimeInt_Int4" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() >= 61) && ($F{zeitinqueue}.intValue() <= 120) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumHandledCallsPerTimeInt_Int5" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() > 120) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerTimeInt_Int1" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() < 11) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerTimeInt_Int2" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() >= 11) && ($F{zeitinqueue}.intValue() <= 30) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerTimeInt_Int3" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() >= 31) && ($F{zeitinqueue}.intValue() <= 60) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerTimeInt_Int4" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() >= 61) && ($F{zeitinqueue}.intValue() <= 120) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerTimeInt_Int5" class="java.lang.Integer" resetType="Group" resetGroup="Time" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() > 120) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumHandledCallsPerDayInt_Int1" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() < 11) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumHandledCallsPerDayInt_Int2" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() >= 11) && ($F{zeitinqueue}.intValue() <= 30) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumHandledCallsPerDayInt_Int3" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() >= 31) && ($F{zeitinqueue}.intValue() <= 60) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumHandledCallsPerDayInt_Int4" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() >= 61) && ($F{zeitinqueue}.intValue() <= 120) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumHandledCallsPerDayInt_Int5" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 2) && ( ($F{zeitinqueue}.intValue() > 120) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerDayInt_Int1" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() < 11) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerDayInt_Int2" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() >= 11) && ($F{zeitinqueue}.intValue() <= 30) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerDayInt_Int3" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() >= 31) && ($F{zeitinqueue}.intValue() <= 60) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerDayInt_Int4" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() >= 61) && ($F{zeitinqueue}.intValue() <= 120) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="SumAbandonedCallsPerDayInt_Int5" class="java.lang.Integer" resetType="Group" resetGroup="date" calculation="Sum"> <variableExpression><![CDATA[( ($F{disposition}.intValue() == 1) && ( ($F{zeitinqueue}.intValue() > 120) ) ) ? 1 : 0]]></variableExpression> </variable> <variable name="MaxQueueTime_Day" class="java.lang.Short" resetType="Group" resetGroup="date" calculation="Highest"> <variableExpression><![CDATA[$F{zeitinqueue}]]></variableExpression> </variable> <variable name="AvgQueueTime_Day" class="java.lang.Short" resetType="Group" resetGroup="date" calculation="Average"> <variableExpression><![CDATA[$F{zeitinqueue}]]></variableExpression> </variable> <variable name="AvgContactTime_Time" class="java.math.BigDecimal" resetType="Group" resetGroup="Time" calculation="Average"> <variableExpression><![CDATA[$F{kontaktzeit}]]></variableExpression> </variable> <variable name="AvgContactTime_Day" class="java.math.BigDecimal" resetType="Group" resetGroup="date" calculation="Average"> <variableExpression><![CDATA[$F{kontaktzeit}]]></variableExpression> </variable> <variable name="AvgTalkTime_Time" class="java.math.BigDecimal" resetType="Group" resetGroup="Time" calculation="Average"> <variableExpression><![CDATA[$F{talkt}]]></variableExpression> </variable> <variable name="AvgTalkTime_Day" class="java.math.BigDecimal" resetType="Group" resetGroup="date" calculation="Average"> <variableExpression><![CDATA[$F{talkt}]]></variableExpression> </variable> <group name="date"> <groupExpression><![CDATA[$F{date}]]></groupExpression> <groupHeader> <band height="82"> <staticText> <reportElement x="278" y="62" width="105" height="20" uuid="67290c30-1bf3-4b28-9811-8f8a79e4d7b5"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Empfangene_Kontakte]]></text> </staticText> <staticText> <reportElement x="383" y="62" width="116" height="20" uuid="425d0d6d-5584-4755-9598-23f6228acf4d"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Angenommene_Kontakte]]></text> </staticText> <staticText> <reportElement x="499" y="62" width="112" height="20" uuid="5064e74b-36e7-4009-9d1a-2758f63a3b65"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Abgebrochene_Kontakte]]></text> </staticText> <staticText> <reportElement x="611" y="62" width="110" height="20" uuid="5d18eb14-8cf3-48d1-ae15-cc8e4aba33f0"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Umgeleitete_Kontakte]]></text> </staticText> <staticText> <reportElement x="721" y="62" width="102" height="20" uuid="9298056c-a9b0-4a1b-808a-dd13e9a0bd53"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Zeit_in_Warteschleife]]></text> </staticText> <staticText> <reportElement x="140" y="62" width="41" height="20" uuid="583a0676-c0a0-4ce1-8469-8272d7c30b34"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Uhrzeit]]></text> </staticText> <staticText> <reportElement x="0" y="62" width="41" height="20" uuid="c3faa7a1-b607-4caa-8979-65c94d33b4f6"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Datum]]></text> </staticText> <staticText> <reportElement x="82" y="62" width="58" height="20" uuid="ce5628a0-43b9-4c85-aca8-b634560d616f"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Wochentag]]></text> </staticText> <staticText> <reportElement x="41" y="62" width="41" height="20" uuid="d340b8f5-de68-4bc4-b3dc-67dbeda80d16"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[KW]]></text> </staticText> <staticText> <reportElement x="181" y="62" width="41" height="20" uuid="82d16f48-d6f3-44ec-9d6f-039d0f42489d"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Stunde]]></text> </staticText> <staticText> <reportElement x="222" y="62" width="56" height="20" uuid="277019a0-c76a-4ebe-86fd-81f24654bb71"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Servicezeit]]></text> </staticText> <staticText> <reportElement x="823" y="62" width="52" height="20" uuid="4a2b5735-72f4-4b34-95c2-83b89375406f"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Sprechzeit]]></text> </staticText> <staticText> <reportElement x="875" y="62" width="85" height="20" uuid="94201785-ada3-43c8-8fcc-957b7f059908"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Nachbearbeitung]]></text> </staticText> <staticText> <reportElement x="960" y="62" width="50" height="20" uuid="424fe479-71b7-4a62-8517-ed31f0ed8881"/> <textElement textAlignment="Center" verticalAlignment="Bottom"/> <text><![CDATA[Holdtime]]></text> </staticText> </band> </groupHeader> <groupFooter> <band height="35"/> </groupFooter> </group> <group name="Uhrzeit"> <groupExpression><![CDATA[$F{time}]]></groupExpression> </group> <group name="Time"> <groupExpression><![CDATA[$F{time}]]></groupExpression> <groupFooter> <band height="20"> <textField> <reportElement x="278" y="0" width="105" height="20" uuid="17c05f64-02eb-4529-aa17-39d800be6831"/> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA[$V{type_1}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="HH.mm"> <reportElement x="140" y="0" width="41" height="20" printWhenGroupChanges="Time" uuid="74b6adb8-9bce-4d1e-92bf-54a2bbe7bd1f"/> <textFieldExpression><![CDATA[$F{time}]]></textFieldExpression> </textField> <textField> <reportElement x="383" y="0" width="116" height="20" uuid="c1ddc009-a686-439c-a625-28c621fcc5cc"/> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA[$V{SumHandledCallsPerTimeInt}]]></textFieldExpression> </textField> <textField> <reportElement x="499" y="0" width="112" height="20" uuid="7b55b21e-f779-490f-8541-7a4e14fe256a"/> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA[$V{SumAbandonedCallPerTimeInt}]]></textFieldExpression> </textField> <textField> <reportElement x="611" y="0" width="110" height="20" uuid="096662db-2359-4302-8adf-f7cf8cf40c68"/> <textElement textAlignment="Right"/> <textFieldExpression><![CDATA[$V{SumRedirectCallPerTimeInt}]]></textFieldExpression> </textField> <textField pattern=""> <reportElement x="0" y="0" width="41" height="20" uuid="3b851b49-1a90-43e2-9397-50cc134fccdc"/> <textElement> <font size="10" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{date}]]></textFieldExpression> </textField> <textField isStretchWithOverflow="true" pattern="" isBlankWhenNull="false"> <reportElement x="82" y="0" width="58" height="20" uuid="05b256b0-3bbd-418d-bfdc-13c34eee0f41"/> <textElement> <font size="10" isBold="false"/> </textElement> <textFieldExpression><![CDATA[$F{date}]]></textFieldExpression> <patternExpression><![CDATA[new SimpleDateFormat("EEEE").format($F{date})]]></patternExpression> </textField> </band> </groupFooter> </group> <background> <band splitType="Stretch"/> </background> <pageHeader> <band height="14" splitType="Stretch"/> </pageHeader> </jasperReport>
1 Answer:
Hi Jaspersoft Community,
This Report was resolved by just completely redoing it. It was the sensible thing to do, since it included so many variables that interwined with each others calculation, but what was needed from me was a Report that just puts the SQL Query answers as they are (one by one).
Just as a sidenote: Before you use existing reports that make your life hell because they're undocumentaded, just do a new one :)
best regards
Peter