New to Telerik Reporting? Download free 30-day trial

CsvDataSource Wizard Overview

The CSV Data Source Wizard allows you to create a new or edit an existing CsvDataSource component in the Telerik Web Report Designer. This article describes the steps you can follow after the wizard appears, after being invoked from the Report Designer toolbox.

  1. Choose a CSV source Select how the CSV source should be retrieved for the component.

    • Upload CSV file from the local computer.
    • Use existing CSV file that previously has been uploaded and/or exists in the IResourceStorage The default implementation of the IResourceStorage interface - ResourceStorage stores resources like CSV files to the location provided as a string parameter in the constructor #ctor. When choosing the option "Use existing CSV file", any existing CSV files found in this directory will populate the dropdown list.
    • Use CSV inline to paste in a string in the text area.
  2. Modify your CSV file If you have chosen to "Upload CSV file" or "Use existing CSV file" you have the option to store this inside the report definition by checking "Embed CSV file in report definition" option. By checking this option the CSV data can be directly edited in the text area, and will no longer be dependent on having the CSV file available in ResourceStorage.

  3. Configure CSV Data Source - Separators Select at least one separator for both "Field (column) separator" and "Record (row) separator". To define a different separator than what is available in the list, choose "Other" and define the symbol in the input-field. Check the consecutive field/record separators option (or both) if empty fields/records have to be omitted. If the CSV data has headers as its first row, check the "This CSV has header row" option.
  4. Configure CSV Data Source - Escape Format Choose the Escape format used in the CSV data. If Quotes or QuotesMixed is selected as Escape Format, the Quote option also must be configured. If the CSV data has comments, enter the symbol which marks the start of a comment as Comment Symbol. If nothing is set, the document is considered to not have comments. For more information regarding the Escape formats, please check CsvDataSource Escape Formats.
  5. Map Columns to Type The Available Columns will be populated based on the CSV data. If "This CSV has header row" option was selected in previous stage, the first column will show the values from the that header-row and the second column show the data-type. The column names and types can be edited. All columns will have a default type of String, and these can be modified by selecting a different type in the dropdown menu. CSV fields type conversion has two separators for numeric types, and a Date format to define the format of a DateTime string.
  6. Preview Data Source Results Preview the data-set and see that it returns the expected data. Click Finish to exit out of the Wizard and save the data source component.
In this article