CSV¶
Connect to a CSV file so you can browse its columns, build a query, and fill the report from that file.
Goal¶
Create a working CSV connection in Connection Manager and use it as a report Data Source.
Prerequisites¶
- One
.csv,.tsv, or.txtfile - A header row in the first row of the file
Steps¶
- Open Data → Connection Manager….
- Add a connection and choose CSV.
- Browse to the file, or enter its path.
- Choose a Delimiter: Comma, Tab, Semicolon, Pipe, or Auto.
- Click Test. A successful test reports how many columns were read.
- Save the connection.
- On the Data tab, select the connection. Browse data and the table named from the file, then open its columns.
- Open Query Builder, choose columns and filters, then Apply.
- Preview the rows, place fields on the report, then Preview.
[ Screenshot: CSV connection settings ]
Notes¶
Note
Desktop keeps the selected file path. In the Web Designer, the uploaded file is stored with the data source.
Note
Column types are inferred from the values. The first row supplies the column names.
Tip
Report parameters ($P{name}) can filter the query the same way they do for a database connection.
Result¶
The connection appears in Connection Manager. Query results become report fields.