Browsing "Older Posts"

APEX-AT-WORK no image

APEX 4.1 Tabular Form - ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table

Von Tobias Arnhold →
I played a bit with tabular forms on views using an instead of trigger. After following the guide from
Christian Rokitta I came really close to what I needed. After I thought I was ready I got the following error message:
ORA-01445: cannot select ROWID from, or sample, a join view without a key-preserved table


I didn't understood what was wrong so I searched the APEX forum for help. I found the reason in this post: https://forums.oracle.com/forums/thread.jspa?threadID=1106262
In there Marc Sewtz wrote about the issue I discovered.

My problem was that I tried to change an already existing tabular form which used declarative validations. After I deleted those validations everything worked fine.

My page was now available in 1 second instead of 5-6 seconds. Great solution.

--------------------------------------------------------------------------------------------------

One problem solved next problem ahead. When I tried updating my tabular form I got this nice Oracle error message: ORA-01031 insufficient privileges

Why?
I simply tried to add this sub-view to my updateable view which looked like that:
CREATE OR REPLACE FORCE VIEW "LOV_YES_NO" ("D", "R") AS 
select 'Yes' as d, 'y' as r from dual
union
select  'No' as d, 'n' as r from dual;

Because "DUAL" is an Oracle system table or whatever. :) I had no privileges to update on this.
So I simply added a real master data table for this and it worked as expected.

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.