This article explains connecting a section report to a CSV data source.
Connection String |
Copy Code
|
---|---|
Path=C:\\MyOrders.csv;Locale=en-IN;TextQualifier=";ColumnsSeparator=,;RowsSeparator=\r\n;Columns=ID,Product,Customer,OrderNumber,Stock,Total(Decimal),UnitPrice(Decimal),City,ProductLine,Discount(Decimal);HasHeaders=True
|
The CSV Data Provider provides the following configuration settings in the Configure CSV Data Source dialog. Based on the defined configuration settings, the CSV connection string is generated.
Setting | Description | Example |
---|---|---|
Path | Path to the CSV file - both local and relative; or a URL for centrally located CSV data sources. | C:\MyOrders.csv |
Encoding | Specify the character encoding used in the CSV file. | Unicode (UTF-8) |
Locale | Specify the locale used in the CSV file. | English (United States) |
File Type |
Define the type of CSV file. You can choose from Fixed and Delimited options. |
Delimited |
Starting Row | Row number to start fetching data. | 0 |
Text Qualifiers | Character to specify where the text begins and ends, that is, the character that encloses values in the CSV file. You can choose from Quotes and Single quotes options. | Quotes |
Columns have headers | Specify whether the CSV file has columns with headers or not. | Checked |
Column Separator | Specify the symbol used to separate the columns in the CSV file. You can choose from Comma, Semicolon, Tab, and Space options. | Comma |
Row Separator | Symbol used to separate the rows in the CSV file. You can choose from CRLF (carriage return and line feed), CR (carriage return), and LF (line feed) new line formats. | New line (CRLF) |
Treat consecutive as one | Specify whether to join the column separators or row separators as one. | Checked for Column separator Unchecked for Row Separator |
Get from preview | Fills the Columns area with names and data types (string by default) for columns present in the CSV file. This allows you to modify the name and data type (like String, Boolean, DateTime, Integer, Float, Decimal, Double, or Long) for the columns. | UnitPrice(Decimal) |
Note: Text Qualifiers, Column Separator, Row Separator, and Treat Consecutive as one options are not available for Fixed file type. |