Configure Custom Fields in Reports

Every report that should be custom fields enabled must be modified in the RDF-file. Reports not changed will not have custom fields available. Customers have to edit layout to show custom fields on the actual printout..

Adding the Custom Field data to the Reporting XML

Three changes to the RDF code are required for each LU in each report

  1. Connect LU:s (often more than one) to a Report Block using a meta data method call. Also clear the table from connections to keep a well maintained Meta data table.
  2. Bring up the rowkey(s) in the cursor.
  3. Make a call(s) to add custom fields to the XML.

Code modification needed

Newly generated RDFs from the Developer Studio (after APP8 SP1) will contain the new changes required for supporting custom fields. Existing RDFs have to be modified according to the below shown changes.

DEFINE PKG                = MODULE_RPI
DEFINE VIEW               = MODULE_REP
...
CREATE OR REPLACE VIEW &VIEW AS
Report_SYS.Define_Report_('&VIEW','&MODULE','&LU', 'Component Information','&TABLE','&PKG..&METHOD',7);
Report_Lu_Definition_API. Clear_Custom_Fields_For_Report(‘MODULE_REP’);
Report_Lu_Definition_API.Enable_Custom_Fields_for_LU(‘MODULE_REP’,  ‘Module’, ‘MODULES/MODULE’);
 
CREATE OR REPLACE PACKAGE BODY &PKG AS
...
   CURSOR get_module IS
      SELECT module, name, description, version, version_desc, rowkey
         FROM module_tab
         WHERE Report_SYS.Parse_Parameter(module, component_) = 'TRUE'
         AND   Report_SYS.Parse_Parameter(version, version_) = 'TRUE';
...
BEGIN
...
FOR master_ IN get_module LOOP
...       IF (do_xml_) THEN
         .
         .
         Xml_Record_Writer_SYS.Add_Custom_Fields(xml_stream_, ‘Module’,master_.rowkey,‘MODULE_REP’);
         Xml_Record_Writer_SYS.End_Element(xml_stream_, 'MODULE');   
      END IF;
END LOOP;

Adding Custom Fields data fields on to the Report Layout

Layout should be manually alter to place the desired custom fields on the desired place on the layout. When operating in the online mode the report designer tool is  capable of identifying the available custom fields of the report. More information can be found in Report Designer guide.

Controlling Custom Fields on Reports

1. Report level controlling

Entire Report can be enabled or disabled for custom fields, this can be done from the report definition.

2. Attribute level controlling

Each Custom filed can be individually controlled, whether its possible to add it to a report or not, this can be done from the particular custom fields.  

Q & A

1. What if rowkey is missing in my table/view?

In views, it is called objkey, in tables it is called rowkey. If it is missing, you can not use Custom Fields for this LU. Skip it.

2. Where do I place the Custom Field XML?

Place it as the last simple item just before the first new block!

3. I do everything right, but no CF shows up in the XML?

Check the report Configuration if the report has been enabled for custom fields . Check in IFS Enterprise Explorer that a CF attribute has been added to the LU you are connecting.