Hi everyone,
I recently migrated from APEX 22.1 to 24.2 and discovered a breaking change in how print documents generate XML for empty result sets.
Previous behavior (APEX 22.1): When my report query returned no rows, the XML structure included empty row elements:
<ROWSET1>
<ROWSET1_ROW>
<COLUMN1></COLUMN1>
<COLUMN2></COLUMN2>
<COLUMN3></COLUMN3>
</ROWSET1_ROW>
</ROWSET1>
Current behavior (APEX 24.2): The same empty result set now generates a self-closing tag:
<ROWSET1/>
Problem: My RTF templates have for-each loops and conditions like <?for-each:ROWSET1_ROW?><?if:COLUMN1!=''?>
that no longer work because there are no ROWSET1_ROW
elements to iterate through when the query returns empty results.
Questions:
- Is this an intentional change or a bug?
- Is there a parameter or setting to maintain the previous XML structure?
- What's the recommended approach for handling this breaking change?
I can work around this by modifying my SQL queries to always return at least one row with placeholder values, but this seems like a significant breaking change that could affect many existing applications.
Has anyone else encountered this issue after upgrading? Any suggestions would be greatly appreciated.
Thanks!