XML Report Definition

ApplyIt! Reporting Engine uses simple XML files to fully describe a Report.

This specification, with Sample Applications, will help you to understand how to design your reports.

 

<Report

Main XML section - Report Definition.

 

  Name="Sample"

You can specify name of the report, this name will appear when you print or preview this report

 

>

 

  <ReportDataStructure>

Report Data Structure Definition section.

 

    <DataSource />

 

Data Source definition section, not supported in v1.0 version, so you must define callback functions to retrieve Data.

 

    <Fields>

 

Fields Definition section.
You can define up to 1024 fields.

 

      <Field

        Name="Name"

        Type="STRING"

      />

 

Every field in your report must have a name and type defined.
Allowed types in v1.0: {"STRING"}.

 

    </Fields>

 

End of Fields Definition.

 

  </ReportDataStructure>

 

End of Report Data Structure Definition.

 

  <Styles>

 

Styles Definition section.

You can define up to 1024 styles.

 

    <Style

      Name="Default"

      FontName="Arial"

      FontCharSet="204"

      FontPitch="14"

      Bold="N"

      Italic="N"

      Color="0"

      BackgroundColor="16777215"

    />

 

Styles are defining presentation of report's objects. Every style in your report must have a name. Other parameters are optional depending on type of object, which style is applied to.

 

Color and BackgroundColor are standard Windows RGB values. These values must represent decimal value of 0x00BBGGRR hex number, where B, G & R are intensity of Blue, Green & Red colors. For example, YELLOW_COLOR (0x00808000) = 8421376.

To specify transparent Background use must specify decimal value of WHITE_COLOR+1 (0x01000000) = 16777216.

 

For example, if style "RedLine" is used to draw red lines only, then you can omit Font specification (FontName, FontCharSet etc.) for "RedLine" style.

 

  </Styles>

 

End of Styles Definition.

 

  <Layout

 

Report Layout Definition section. This section defines how report will appear to end user. Here you define Bands of the report and Objects, contained in every Band.

In every Band you will define array of objects.

Allowed Objects: {"Field", "Label", "Line"}.

For every object you need to define position (X, Y) and size (Width, Height) (*).

Please note, that position is relative to Band top-left corner.

 

    Style="Default"

 

You can specify default style for all bands and objects.

 

  >

 

    <Header

      Height="200"

      Style="Big"

    >

 

Definition of Report "Header" Band.

You must specify absolute height of the band (*).

You can specify default style for this specific band.

Header will be printed on the top of each page.

 

      <Label

        Text="Name"

        X="0"

        Y="100"

        Width="500"

        Height="100"

      />

 

This is example of Label object in the report. You need to place Label and assign Text to print.

You also can specify explicit Style name, otherwise default will be used.

 

      <Line

        X="0"

        Y="200"

        Width="1800"

        Height="0"

      />

 

This is example of Line object in the report. Position + Size define bottom-right point of the object, so line will be drawn from top-left to bottom-right points.

You also can specify explicit Style name, otherwise default will be used.

 

      <Image

        FileName="logo.bmp"

        X="0"

        Y="200"

        Width="1800"

        Height="0"

      />

 

This is example of Image object in the report. Position + Size define bottom-right point of the object, so picture will be stretched to fit into this rectangle.

You must provide picture FileName with full or relative path to picture.

 

Supported file types are:

- BMP (Bitmap images);

- DIB (Device Independent Bitmap images);

 

    </Header>

 

End of "Header" Band Definition.

 

    <Detail

      Height="100"

    >

 

Definition of Report Detail Band.

You must specify absolute height of the band (*).

 

      <Field

        Name="Name"

        X="0"

        Y="0"

        Width="500"

        Height="100"

      />

 

This is example of Field object in the report. You need to place Field and link this object to Data Source Field by Name.

You also can specify explicit Style name, otherwise default will be used.

    </Detail>

 

End of "Detail" Band Definition.

 

    <Footer

      Height="100"

      Style="Big"

    >

 

Definition of Report Footer Band.

You must specify absolute height of the band (*).

You can specify default style for this specific band.

Footer will be printed in the bottom of each page.

 

      <Rect

        X="0"

        Y="0"

        Width="1800"

        Height="100"

      />

 

This is example of Rectangle object in the report. Position + Size define bottom-right point of the object, so Rectangle will be drawn from top-left to bottom-right points.

You also can specify explicit Style name, otherwise default will be used.

 

   </Footer>

 

End of "Footer" Band Definition.

 

 </Layout>

 

End of Report Layout Definition.

 

</Report>

 

End of Report Definition.

 

*) All measurements (object positions and sizes) must be specified in 0.1 mm (i.e. 1cm == 100 measurement units).