How to use CSV file as Data Source in SSRS Report - SQL Server Reporting Services(SSRS)

Scenario:

Let's say we are working with Asset under Management company, they would like to get rating everyday from different companies such as Bloomberg etc. in csv file. We should like to read data from the csv file and display for our users in SSRS Report.


Solution:

Here is step by step solution.

Step 1: Create the DSN entry
Go to Control Panel -- Administrative Tools and then click Setup ODBC data sources(32-bit)
Step 2:
Create DSN Entry as shown below


Step 3:Choose the Directory in which your CSV file will be


 Step 4: Open SSDT and create new Report
Open SQL Server Data Tools and create new report. Go to Data Source and create Data Source by using DSN entry we have created.

Step 5:
Go to Data Set and create DataSet by using below Query
Select * From yourfilename.csv

If you like you can add where clause as well. After writing your query, you will see the fields and will be able to use them in your report.





8 comments:

  1. Why we should choose 32 bit instead of 64 bit ODBC?

    ReplyDelete
  2. Individual data must be precise and, where vital, stayed up with the latest
    ccanadianonline1

    ReplyDelete
  3. I could not get this to work unfortunately. Possibly an X86 vs X64 compatibility issue.

    I created the X86 ODBC exactly as shown above.

    When I create the dataset in Report Builder & click 'Refresh Fields', the fields are called F1, F2, etc instead of per Line 1 in the CSV.

    Then when I try to run the new report in ReportServer, it errors with "An error has occurred during report processing. (rsProcessingAborted)
    Cannot create a connection to data source 'blah'. (rsErrorOpeningConnection)
    ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"

    ReplyDelete
  4. ada ratusan juta bonus kemenangan setiap hari dari situs resmi permainan TOTO Online terlengkap terpercaya di Indonesia AFATOGEL segera daftar dan main sekarang juga

    ReplyDelete