Browsing "Older Posts"

Pivot Beispielapplikation ist Online

Von Tobias Arnhold → 10.25.2012
Ich habe endlich etwas Zeit gefunden die Anwendung online zu bringen. Hier ist der Link:
http://apex.oracle.com/pls/apex/f?p=65580



Aktuell arbeite ich an einer modifizierten Version. Wer Interesse an einer Live-Präsentation hat, sollte die nächsten lokalen DOAG Termine im Auge behalten.

Die aktuelle Version schicken ich Interessierten auch gerne zu.

Info zur Installation:
Wer auch die automatische PDF Generierung benutzen möchte, der muss folgende Steps durchführen:
 - Aktuelle jrxml2pdf Version downloaden:  http://sourceforge.net/projects/pljrxml2pdf
 - jrxml2pdf Beispielapplikation installieren + Supporting Objects
 - In Beispielapplikation folgende neue Definition anlegen:
Name: PivotReport
jrxml for
report
(Achtung Feldgröße liegt bei APEX 4.2 nur bei 255 Zeichen, diese auf 32000 Zeichen erhöhen):
<?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="report1" language="groovy" pageWidth="595" pageHeight="842" columnWidth="555" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20" isFloatColumnFooter="true" uuid="0a6876d5-cc17-47a9-b072-2f4be3000e61">
 <property name="ireport.zoom" value="1.0"/>
 <property name="ireport.x" value="0"/>
 <property name="ireport.y" value="0"/>
 <queryString>
  <![CDATA[select team as "Verein",
       nvl(sum("11/12"),0) as "11/12", nvl(sum("10/11"),0) as "10/11",
       nvl(sum("09/10"),0) as "09/10", nvl(sum("08/09"),0) as "08/09",
       to_char(sysdate,'dd.mm.yyyy') as cur_date,
       v('P10_USERNAME') as app_user
from (
  SELECT team,
  DECODE (jahr, '11/12', punkte, NULL) as "11/12",
  DECODE (jahr, '10/11', punkte, NULL) as "10/11",
  DECODE (jahr, '09/10', punkte, NULL) as "09/10",
  DECODE (jahr, '08/09', punkte, NULL) as "08/09"
  FROM (SELECT jahr, team, punkte FROM tbl_bundesliga)
)
group by team
order by team asc]]>
 </queryString>
 <field name="Verein" class="java.lang.String"/>
 <field name="11/12" class="java.math.BigDecimal"/>
 <field name="10/11" class="java.math.BigDecimal"/>
 <field name="09/10" class="java.math.BigDecimal"/>
 <field name="08/09" class="java.math.BigDecimal"/>
 <field name="CUR_DATE" class="java.lang.String"/>
 <field name="APP_USER" class="java.lang.String"/>
 <variable name="PRINT1" class="java.lang.String"/>
 <background>
  <band splitType="Stretch"/>
 </background>
 <pageHeader>
  <band height="62">
   <staticText>
    <reportElement uuid="39c15a6e-237e-49f7-bb5b-343a8c60dd98" x="0" y="13" width="555" height="37"/>
    <textElement textAlignment="Center">
     <font size="22" isBold="true" isUnderline="true"/>
    </textElement>
    <text><![CDATA[Bundesliga Historie 08/09 - 11/12]]></text>
   </staticText>
  </band>
 </pageHeader>
 <columnHeader>
  <band height="21" splitType="Stretch">
   <line>
    <reportElement uuid="08af8ace-e78a-4a9e-afdc-6b74abeef679" x="108" y="0" width="1" height="20"/>
   </line>
   <line>
    <reportElement uuid="5a5b9e4f-672f-4f1c-be01-576545ed5efb" x="1" y="20" width="554" height="1"/>
   </line>
   <staticText>
    <reportElement uuid="215c203d-8de5-42c4-a64f-c5af97e973d4" x="0" y="0" width="111" height="20"/>
    <textElement/>
    <text><![CDATA[Verein]]></text>
   </staticText>
   <staticText>
    <reportElement uuid="6ee6eec2-5139-44fc-856d-94cbd0be7e9a" x="111" y="0" width="111" height="20"/>
    <textElement/>
    <text><![CDATA[11/12]]></text>
   </staticText>
   <staticText>
    <reportElement uuid="0b89f4f7-0cd0-4326-9b10-569d3386860b" x="222" y="0" width="111" height="20"/>
    <textElement/>
    <text><![CDATA[10/11]]></text>
   </staticText>
   <staticText>
    <reportElement uuid="4b5b3f24-ad6c-4e1a-befc-0aa2126e29c5" x="333" y="0" width="111" height="20"/>
    <textElement/>
    <text><![CDATA[09/10]]></text>
   </staticText>
   <staticText>
    <reportElement uuid="895f102a-e381-4348-899d-3141a0b28123" x="444" y="0" width="111" height="20"/>
    <textElement/>
    <text><![CDATA[08/09]]></text>
   </staticText>
  </band>
 </columnHeader>
 <detail>
  <band height="20" splitType="Stretch">
   <line>
    <reportElement uuid="aa17a7d8-4339-401c-a143-39b6f289299d" x="108" y="0" width="1" height="20"/>
   </line>
   <textField>
    <reportElement uuid="125ed9f3-0ee7-4d7a-895a-4bc917fdfdaf" x="0" y="0" width="111" height="20"/>
    <textElement/>
    <textFieldExpression><![CDATA[$F{Verein}]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement uuid="961d5a0f-c46e-4879-abf7-33dcd67d281f" x="111" y="0" width="111" height="20"/>
    <textElement/>
    <textFieldExpression><![CDATA[$F{11/12}]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement uuid="4a923094-0df9-482a-94d7-73f0f1638c6c" x="222" y="0" width="111" height="20"/>
    <textElement/>
    <textFieldExpression><![CDATA[$F{10/11}]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement uuid="aeec58bc-280a-492a-b6e4-7d42b5d7cd94" x="333" y="0" width="111" height="20"/>
    <textElement/>
    <textFieldExpression><![CDATA[$F{09/10}]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement uuid="8b66b028-f274-413f-a1e6-be0900b40a17" x="444" y="0" width="111" height="20"/>
    <textElement/>
    <textFieldExpression><![CDATA[$F{08/09}]]></textFieldExpression>
   </textField>
  </band>
 </detail>
 <pageFooter>
  <band height="31">
   <staticText>
    <reportElement uuid="a8347c0f-3c4d-42f3-99f7-766255410b0b" x="0" y="0" width="40" height="20"/>
    <textElement/>
    <text><![CDATA[Nutzer:]]></text>
   </staticText>
   <textField>
    <reportElement uuid="9a8b7e7a-7482-48ff-8e70-f142b8291437" x="40" y="0" width="311" height="20"/>
    <textElement/>
    <textFieldExpression><![CDATA[$F{APP_USER}]]></textFieldExpression>
   </textField>
   <textField>
    <reportElement uuid="b6a7c7cb-e435-4341-8b6f-976c3bbad57b" x="444" y="0" width="111" height="20"/>
    <textElement textAlignment="Right"/>
    <textFieldExpression><![CDATA["Datum: " + $F{CUR_DATE}]]></textFieldExpression>
   </textField>
  </band>
 </pageFooter>
</jasperReport>
APEX-AT-WORK no image

Pivot Beispielapplikation

Von Tobias Arnhold → 10.17.2012
Hallo Zusammen,
im Zuge der letzten APEX SIG habe ich meine Pivot Anwendung als Packaged App fertiggestellt. Wer noch Interesse an einer Kopie hat, der kann sich gern bei mir melden.
Email: tobias-arnhold@hotmail.de

Die Live Anwendung werde ich ebenfalls bald auf dem apex.oracle.com online stellen.

Hide Interactive Report Column with jQuery

Von Tobias Arnhold →
$(".apexir_WORKSHEET_DATA").find("[headers='COLUMN_NAME']").hide();
$('#COLUMN_NAME').hide();
Why would you need this? In case the end user wants to search for a text and doesn't need the corresponding column to be displayed.
But you may need it in a other situation?
APEX-AT-WORK no image

UILayout and S3Slider Plugin - Usability Update

Von Tobias Arnhold → 9.19.2012
After a lot of mails and requests I decided to create an example application and an extended documentation to each of the plugins. It will be published in the next weeks.

UILayout for APEX:
http://www.apex-plugin.com/oracle-apex-plugins/dynamic-action-plugin/uilayout-part-1-initialize_77.html
S3Slider for APEX
http://www.apex-plugin.com/oracle-apex-plugins/region-plugin/s3slider-for-apex_165.html



Cheers
Tobias

APEX SIG Event am 26.09

Von Tobias Arnhold → 9.18.2012
Nicht vergessen am 26.09 findet ein SIG Development Day zum Thema APEX statt. Mein Thema befasst sich mit APEX und Pivot Reports:


Aktuell arbeite ich noch an einer passenden Beispielapplikation, damit niemand denkt, dass es nur langweilige Folien zu sehen gibt.

Check-box bug in tabular form

Von Tobias Arnhold → 9.17.2012
I don't know if this is a environment problem or a general one. Anyway it is mad and took me a long while to find out what it is.
Here we go:
 - I have a tabular form with standard APEX processing.
 - The tabular form includes a single check-box column with y,n
 - The check-box column is conditional



As you can see the condition will always execute. And so it does. My column is perfectly displayed on my page.

Problem/Bug:
Now whenever I try to save my changes. Nothing happens. The "Mulit Row Update"-Process does not get executed.
After some analyzing I found out that there were no more hidden elements for the tabular form created. APEX just didn't know what to save.

If I take the conditional display away it works fine.
As you see those marked input elements disappear with the conditional single checkbox.

Current environment:
We use Application Express 4.1.0.00.32

Is this a known bug? Have you ever experienced something like that?

Update
After some more investigation and a good hint from a colleague I found the real reason.
What I didn't mentioned: All columns where conditional and in that case APEX doesn't know where to add the hidden elements. I made another column unconditional and it worked (even with my conditional single check box).
Good to know! :)

HowTo: Dynamisch berechnete Werte setzen

Von Tobias Arnhold → 9.16.2012

Wie berechne ich während der Laufzeit neue Werte und aktualisierte anschließend meine APEX Items.
Die Lösung für diese Fragestellung ist recht einfach, man nehme eine Dynamic Action nutzt die "Set Value"-Funktion um mit dieser mehrere APEX Items während der Laufzeit durch berechnete Werte zu setzen.

An Hand des folgenden Beispiels erkennen Sie die Logik:
Die Items haben  folgende Namen:
P3_TEAM
P3_NAME
P3_PUNKTE
P3_ANZ_MEISTERSCHAFTEN

Bei Auswahl eines Teams werden automatisch die Felder Name, Punkte und Anzahl Meisterschaften gesetzt.

Dieses Beispiel besteht aus einer Dynamic Action, die 3 "True"-Aktionen beinhaltet.
Die erste "True"-Aktion reagiert auf das Change Event beim APEX Item P3_TEAM (unsere Select List).
Um die Werte entsprechend zu bestimmen wird eine Set Value Funktion ausgeführt. Diese berechnet die Werte für die Items: P3_PUNKTE & P3_ANZ_MEISTERSCHAFTEN
Außerdem wird dem Item P3_NAME der Rückgabewert unseres Teams zugewiesen.
Dies geschieht auf APEX Session und auf Browser Ebene.

Nun wiederholen wir nur die Übergabe der Parameter für die anderen beiden Items, in dem wir zwei weitere "True"-Aktionen anlegen.
Es mag vielleicht etwas komplex aussehen, ist aber mit etwas Übung recht einfach anzuwenden. Außerdem bleiben Sie die ganze Zeit im APEX Standard und müssen so nicht, eine Sonderlocke aufsetzen um einen individuellen Nutzerwunsch umzusetzen.