Skip to content

How to use the CSV Plug-in

This is a plug-in that transforms a flat xml stream into a csv stream. In order to use it a number of properties has to be set in the rpl file.

Report Plug-in Layout

Layout properties

The required layout properties for the csv plug-in:

NameValue
plugin-typeCSV
plugin-classifs.application.reportingservices.impl.extendedformatter.csvplugin.CSVPlugin
output-extensioncsv
flattened-xmlTRUE

Plug-in properties

The plug-in properties are not case sensitive and can be in any order, if they are not included in the rpl file the default values will be used.

NameTypeDefault valueDescription
delimiterTextsemicolon (;)The character that separates the values.
newlineText\nThe character/s that represents a new line.
quoteTextquotation mark (")The character that encloses values that has embedded delimiters.
useColumnNamesYES/NOYESWhether or not to use display names as column names for the first row.

Plug-in data

This plug-in does not use the data tag of the report plug-in layout.

Plug-in variables

This plug-in does not use the variable tag of the report plug-in layout.

Example

<?xml version="1.0" encoding="UTF-8"?>  
<report-layout>  
    <properties>  
        <version>0.1</version>  
        <layout-type>CSV</layout-type> <!--SCRIPT,XSL,XML,EXCEL-->  
        <plugin-class>ifs.application.reportingservices.impl.extendedformatter.csvplugin.CSVPlugin</plugin-class>  
        <output-method>FILE</output-method> <!-- BINARY,FILE,E-MAIL-->  
        <output-extension>csv</output-extension>  
        <default-output-reference>  
           <binary>\\user\ZebraGX4</binary>  
           <file-sender>FILE_SENDER1</file-sender>  
           <e-mail>firstname.lastname@something.com</e-mail>  
   <e-mail-sender>firstname.lastname@something.com</e-mail-sender>  
   <e-mail-cc></e-mail-cc>  
   <e-mail-subject>Email Subject</e-mail-subject>  
   <e-mail-body>  
<![CDATA[  
Email Body Content from the RPL  
]]>   
   </e-mail-body>  
        </default-output-reference>  
        <full-xml>TRUE</full-xml>  
<flattened-xml>  
<enabled>TRUE</enabled>  
<strongtyping>TRUE</strongtyping>  
    </flattened-xml>  
        <report-id>MODULE_REP</report-id>  
        <report-title>RPL LAYOUT</report-title>  
    </properties>  
    <plugin>  
        <properties>  
            <delimiter>,</delimeter>  
            <newline>\r</newline>  
            <quote>'</quote>  
            <useColumnNames>NO</useColumnNames>  
        </properties>  
        <data>   
            <!-- not used by this plugin -->  
        </data>  
        <variables>  
            <!-- not used by this plugin -->  
        </variables>  
    </plugin>  
</report-layout>