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.
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 !
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.
- I create a new query report (very simple) : select nom_parti, prenom_parti from tb_parti;
- I download the "Source for Report Layout" in "XML Data" format. --> the .xml file is ok.
- 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.
- In APEX : new Report Layout -> Named Columns -> selected the .xslt file generated by Altova.
- Back in my report query -> select my report layout ; output format : PDF (inline).
- Test -> PDF works !!
- Back in my report query -> output format : XML (attachement)
- 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 !