Inspecting the dataset when running ForNAV reports

Sometimes when running a report there is no output, records are missing from the output, or sections are not printed as you expected.

Just like when running RDLC or a Word report, it is possible to get the dataset by running the report from C/SIDE using a Report.SaveAsXML call – but because ForNAV often does not have columns (or very few of them) it can be hard to see what data the report consumes or what it does with it based on the xml output.

Instead, if you run the report from the ForNAV Designer using the Inspect report data action under Preview, you get an xml document with the dataset plus a whole lot of other useful information.


In the following example, you can see what language has been used, what the key is, and the value of the columns on a data item for each record:

<?xml version=”1.0″ encoding=”utf-8″?>


  <Pre />

  <DataItem DataItemId=”SalesInvoiceHeader”>

    <PreDataItem />

    <WriteDataItem LanguageId=”2057″ CurrentKey=”No.=103001″ />

    <DataItem DataItemId=”CopyLoop”>

      <PreDataItem />

      <WriteDataItem LanguageId=”2057″ CurrentKey=”Number=1″ />

      <DataItem DataItemId=”PageLoop”>

        <PreDataItem />

        <WriteDataItem LanguageId=”2057″ CurrentKey=”Number=1″>


            <Column PageCaption=”Page ” />

            <Column PricesInclVAT_YesNo=”No” />

            <Column OutputNo=”0″ />


And for each section, you can see the values of each control, the ShowOutput value, and the page offset of the section:

          <WriteSection SectionId=”Header4″>

            <WriteControl ControlId=”ForNavTextBox41″ Text=”No.” DataType=”Text” />

            <WriteControl ControlId=”ForNavTextBox42″ Text=”Description” DataType=”Text” />

            <WriteControl ControlId=”ForNavTextBox43″ Text=”Quantity” DataType=”Text” />

            <WriteControl ControlId=”ForNavTextBox44″ Text=”Unit of Measure” DataType=”Text” />

            <WriteControl ControlId=”ForNavLabel45″ Text=”Unit Price” DataType=”Text” />

            <WriteControl ControlId=”ForNavLabel46″ Text=”Disc. %” DataType=”Text” />

            <WriteControl ControlId=”ForNavLabel47″ Text=”Amount” DataType=”Text” />

            <WriteControl ControlId=”ForNavTextBox102″ Text=”VAT Identifier” DataType=”Text” />

            <WriteControl ControlId=”ForNavLabel106″ Text=”Posted Shipment Date” DataType=”Text” />

            <OutputSection Output=”true” PageOffset=”449,6457″ />