5 Replies Latest reply: Oct 15, 2013 4:19 PM by 1001059 RSS

    Altova StyleVision 2013 - APEX PDF Report

    1001059

      Hello,

       

      I read this tutorial for create report : http://www.oracle.com/technetwork/developer-tools/apex/learnmore/custom-pdf-reports-1953918.pdf

       

      But I have a problem when I create report for APEX with Altova StyleVision.

      I use Oracle XE 11gR2, APEX 4.2 and APEX Listener 2.0.4.

       

      In APEX, I created a state with 14 queries, and I exported in XML format.

       

      I can built four tables (from 4 different queries / rowset) in my report, and PDF printing works.

      But I have a problem when I want to add a fifth query (table) in my report :

       

      When I generate the PDF document from my APEX application, I have the following error message :

       

      "Error displaying the error page ORA-01403: No data found ORA-06502: PL / SQL: numeric or value error"

       

      Do you know why I get this error message when my report has 5 queries ?

      The number of queries in a PDF report is limited?

       

      Thank you very much for your help ! And sorry for my english ;-)


        • 1. Re: Altova StyleVision 2013 - APEX PDF Report
          Mike Kutz

          I'm still experimenting with this setup.  I can only give you some ideas on what to check.

           

          • Make sure APEX is configured to print via Listener (not FOP or anything else)
          • Make sure you XSLT is the 1.0 version (2.0 doesn't work)
          • Double check that the 5th query actually produces data.
          • Try downloading the XML from within the Report definition (ie 'run the report but download XML instead of making PDF')
          • Double check that your Report is assigned to the correct Report Layout
          • Try making a new Report Layout in APEX using the same XSLT file (did something get corrupted?)
          • last step -- build a new XSLT in StyleVision using the new XML sample data(*)

           

          (*) StyleVision creates an XML schema based on the sample XML file.

          If the format of the XML changes due to adding/removing columns and/or queries, the XSLT may no longer work.

          (you now need an XSLT based on a different XML schema.)

          I have no idea how 'true' the above statement is.  It is just an idea worth trying.

           

          If you discover the fix yourself, make sure you post it up so that future forum users can see the answer.

           

          MK

          • 2. Re: Altova StyleVision 2013 - APEX PDF Report
            1001059

            Thank you for your answer !

             

            This is what I checked :

            • APEX is configured to print via Listener --> ok !
            • XSLT is the 1.0 version --> ok !
            • 5th query actually produces data --> ok ! If I create a new Report (with Altova) with only this query, the PDF works.
            • Your Report is assigned to the correct Report Layout --> ok !
            • Making a new Report Layout in APEX using the same XSLT file --> same error !
            • Build a new XSLT in StyleVision using the new XML sample data --> same error !
            • Downloading the XML from within the Report definition (ie 'run the report but download XML instead of making PDF') --> here there is maybe an error. When I open with a text editor the xml file downloaded, it contains this : "String index out of range: -1". BUT when I do the same operation with a pdf file who works (only 4 queries), the xml file downloaded contains the same message (String index out of range: -1).

             

            I forgot to say that I use the trial version of Altova, and my APEX Listener run in Standalone mode.

             

            Do you have any other answer to my problem ?

             

            Thank you very much for your help !

            • 3. Re: Altova StyleVision 2013 - APEX PDF Report
              Mike Kutz

              If you can't make an XML file, then you can't generate a report.

              The fact that you are seeing an error on both a 'good' design (4 queries) and a 'bad' design (5 queries) makes me believe you aren't downloading the XML file correctly or the error you are seeing is actually from the editor you are using.

               

              Right now, your goal needs to be:  get a good XML file downloaded

              Start with a report that has only 1 query.

              Try using 'notepad' or 'wordpad' (do not use MS Word or IE)... or use one of Altova's XML viewing software (XMLSpy has a cost, but I believe they have a free version)

              Then try 2 queries, 3 queries, 4 queries, and (finally) 5 queries.

               

              StyleVision has nothing to do with the actual generation of the report outside of making the XSLT-FO file that is used to make the report.

              Once the XSLT-FO file is saved, StyleVision is 'out of the picture'.

               

              Secondary goal:  Try to recreate the problem on apex.oracle.com

              (just make sure you do not use any of your proprietary data values.)

              If you can reproduce the error there, other people, including Oracle Support, can take a look at it.

               

              MK

              • 4. Re: Altova StyleVision 2013 - APEX PDF Report
                1001059

                Thank you.

                 

                1. I create a new query report (very simple) : select nom_parti, prenom_parti from tb_parti;
                2. I download the "Source for Report Layout" in "XML Data" format. --> the .xml file is ok.
                3. In Altova : File -> New -> New From XML. Then I select the .xml file -> Generate a new xml schema. Switch to xml 1.0, create my table (rowset), File -> Save Generated File -> Save Generated XSLT-FO File.
                4. In APEX : new Report Layout -> Named Columns -> selected the .xslt file generated by Altova.
                5. Back in my report query -> select my report layout ; output format : PDF (inline).
                6. Test -> PDF works !!
                7. Back in my report query -> output format : XML (attachement)
                8. I open the new .xml file withe notepad -> message "String index out of range: -1" !

                 

                So, contrary to what you said, I can generate a pdf report despite I can't make an xml file. True ?

                 

                I think my problem is my Apex Listener Standalone.... but I don't know what ???

                 

                Thank you for helping me !

                • 5. Re: Altova StyleVision 2013 - APEX PDF Report
                  1001059

                  Hello,

                  For information, I solved the problem by installing Apex 4.2.3.

                  I still have the message "String index out of range: -1" when I download the xml file, but reports with more than 4 queries work !