Telerik Reporting R1 2017

Design Considerations for CSV Rendering

The Comma-Separated Value (CSV) rendering extension renders reports as a flattened representation of data from a report in a standardized, plain-text format that is easily readable and exchangeable with many applications.

The CSV rendering extension uses a string character delimiter to separate fields (, - comma) and rows (<cr><lf>). The string character delimiter is configurable to be a character other than a comma. The resulting file can be opened in a spreadsheet program or used as an import format for other programs. The exported report becomes a .csv file, and returns a MIME type of text/plain.

When rendered using the default settings, a CSV report has the following characteristics:

  • The first record contains headers for all the columns in the report (the items' name, not value).
  • All rows have the same number of columns.
  • The default field delimiter string is a comma (,).
    Note Note
    You can change the field delimiter to any character that you want, by changing the device information settings. For more information, see CSV Device Information Settings.
  • The record delimiter string is the carriage return and line feed (<cr><lf>).
  • The text qualifier string is a quotation mark (").
  • If the text contains an embedded delimiter string or qualifier string, the text qualifier is placed around the text, and the embedded qualifier strings are doubled.
  • Formatting and layout are ignored.

 

The following items are ignored during processing:

  • Page Header Section
  • Page Footer Section
  • Shape
  • PictureBox
  • Chart

The remaining report items appear as ordered in the parent’s item collection. Each item is then rendered to a column. If the report has nested report, the parent items are repeated in each record.

The following table lists the considerations applied to items when rendering to CSV:

Report Item

Rendering Behavior

TextBox

Renders the contents of the text box. The data is formatted according to the item's Format property

Crosstab

Renders by expanding the table and creating a row and column for each row and column at the lowest level of detail. Due to this data denormalization (flattening) some Crosstab configurations will not be exported correctly.

Graph

Renders the chart series data.

Table

Renders by expanding the table and creating a row and column for each row and column at the lowest level of detail. Due to the this data denormalization (flattening) some Crosstab configurations will not be exported correctly.

CheckBox

 

Renders the contents of the CheckBox. The Text is formatted according to the item's Format property. The first character of resulting string represents the CheckMark state: 0 is Unchecked, 1 is Checked and 2 is Indeterminate.

Detail section

Renders a record for each detail row.

Report Header Section

Renders its content at the beginning of each detail row.

Group Header Section

Renders its content at the beginning of each detail row after the Report Header content if any.

Group Footer Section

Renders its content at the end of each detail row.

Report Footer Section

Renders its content at the end of each detail row after the Group Footer content if any.

Flattening the Hierarchical and Grouped Data

Hierarchical and grouped data must be flattened in order to be represented in the CSV format.

The rendering extension flattens the report into a tree structure that represents the nested groups within the data item. To flatten the report:

  • A row hierarchy is flattened before a column hierarchy.

  • Columns are ordered as follows: text boxes in body order left-to-right, top-to-bottom followed by data items ordered left-to-right, top-to-bottom.

  • Within a data item, the columns are ordered as follows: corner members, row hierarchy members, column hierarchy members, and then cells.

  • Peer data items are data items or dynamic groups that share a common data item or dynamic ancestor. Peer data is identified by branching of the flattened tree.

The CSV rendering is best suited for reports with one flat databound data item.

Interactivity

This rendering extension does not support any interactive features.

See Also