My Oracle Support Banner

Exclude Column From Output At Runtime Using Xml (Doc ID 340793.1)

Last updated on JULY 24, 2023

Applies to:

Oracle Reports Developer - Version 12.2.1.4.0 and later
Oracle Forms for OCI - Version 12.2.1.4.0 and later
Information in this document applies to any platform.
This problem can occur on any platform.

Symptoms

Want to use XML in afterpform trigger in order to exclude data column or not from output.

Have a query "select sysdate MYDATE, 'AZI' from dual" in data model.
The property "Exclude from XML output" is "No".

Function AfterPForm return boolean is
begin

SRW.ADD_DEFINITION('<report DTDVersion="1.0">');
SRW.ADD_DEFINITION('<customize>');
SRW.ADD_DEFINITION('<object name="MYDATE" type="REP_COL_MAP">');
SRW.ADD_DEFINITION('<properties>');
SRW.ADD_DEFINITION('<property name="XMLSuppress">yes</property>');
SRW.ADD_DEFINITION('</properties>');
SRW.ADD_DEFINITION('</object>');
SRW.ADD_DEFINITION('</customize>');
SRW.ADD_DEFINITION('</report>');
SRW.APPLY_DEFINITION;
return (TRUE);
end;


When generating the report to XML the column "MYDATE" appears in the output:

--- begin ---
<?xml version="1.0" encoding="WINDOWS-1252"?>
<!-- Generated by Oracle Reports version 9.0.4.2.0 -->
<TEST_EXCLUDE_COLUMN>
<LIST_G_SYSDATE>
<G_SYSDATE>
<AZI>AZI</AZI>
<MYDATE>11-NOV-05</MYDATE>
</G_SYSDATE>
</LIST_G_SYSDATE>
</TEST_EXCLUDE_COLUMN>
--- end ---

Objective : Expecting that MYDATE column to not appear in the output. Like:

--- begin ---
<?xml version="1.0" encoding="WINDOWS-1252"?>
<!-- Generated by Oracle Reports version 9.0.4.2.0 -->
<TEST_EXCLUDE_COLUMN>
<LIST_G_SYSDATE>
<G_SYSDATE>
<AZI>AZI</AZI>
</G_SYSDATE>
</LIST_G_SYSDATE>
</TEST_EXCLUDE_COLUMN>
--- end ---

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.