Inspect the XML data stream (C#)

Enable debugging to create a file containing the XML stream of the report program.

In the Source code for a simple .NET report application example, this line of code enables debugging:
report.debugLevel = debug_level;

Where debug_level can be:

  • 0: nothing
  • 1: fatal only
  • 2: fatal and error
  • 3: fatal, error, and warning
  • 4: fatal, error, warning, and info
  • 5: fatal, error, warning, info, and debug
  • 6: fatal, error, warning, info, debug, and trace
  • 6+: all debug information
Note: If GREDATAFILE is set, no report is created and setting the debug level has no effect.

When debugging is enabled and you run the program, the report engine creates XML files called jdebug[0-9]?.xml that contain the xml stream as it leaves the various filters on the pipe. In distributed mode, these files are created on the server side.

Example

This jdebug.xml file contains the unprocessed input at the head of the pipe as it is created by the Serializer, when the simple report program provided runs.
<?xml version="1.0" encoding="windows-1252"?>
<?PipeConfiguratorStyleSheet  reportFileName="../Sales/SalesList.4rp"
  preview="false" outputFileName="SalesList.pdf" outputDevice="PDF" 
  processArbitraryXMLInput="true" debugLevel="9"?>
<sales>
    <shopName>Columbus Arts</shopName>
    <zipCode>75038</zipCode>
    <day>2015-01-14T17:27:15.355+01:00</day>
    <items>
        <articleName>Table lamp</articleName>
        <category>Furniture</category>
        <price>23.0</price>
        <runningTotal>23.0</runningTotal>
    </items>
    <items>
        <articleName>Table lamp</articleName>
        <category>Furniture</category>
        <price>267.0</price>
        <runningTotal>290.0</runningTotal>
    </items>
    <items>
        <articleName>Office chair</articleName>
        <category>Furniture</category>
        <price>155.0</price>
        <runningTotal>445.0</runningTotal>
    </items>
    <items>
        <articleName>Grandfather clock</articleName>
        <category>Furniture</category>
        <price>329.0</price>
        <runningTotal>774.0</runningTotal>
    </items>
    <items>
        <articleName>Scissors</articleName>
        <category>Supplies</category>
        <price>19.0</price>
        <runningTotal>793.0</runningTotal>
    </items>
    <items>
        <articleName>Measuring tape</articleName>
        <category>Supplies</category>
        <price>23.0</price>
        <runningTotal>816.0</runningTotal>
    </items>
    <items>
        <articleName>Sun glasses</articleName>
        <category>Travelling</category>
        <price>15.95</price>
        <runningTotal>831.95</runningTotal>
    </items>
    <items>
        <articleName>Pen knife</articleName>
        <category>Travelling</category>
        <price>6.25</price>
        <runningTotal>838.2</runningTotal>
    </items>
    <items>
        <articleName>Ornate angel</articleName>
        <category>Art</category>
        <price>1.95</price>
        <runningTotal>840.1500000000001</runningTotal>
    </items>
</sales>