?
Solved

how do I use a text file as a data source in SSRS

Posted on 2008-10-13
1
Medium Priority
?
3,388 Views
Last Modified: 2013-11-05
Does anyone have an example on how to use a text file as a SSRS data source?  In this case it is a CSV file.  I know that I could use SSIS to import and then report off of it, but I would rather directly access the file from within SSRS.

Thank you
0
Comment
Question by:fmsdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 

Accepted Solution

by:
fmsdev earned 0 total points
ID: 22725585
found this at: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=955207&SiteID=1

RS supports ODBC providers, so you can specify that you want to use the CSV/text provider, and set your connection string accordingly. (The designer may have issues with regard to removing the '{' and '}' characters from the connection string, if you use the data source dialog for setting the connection string. So, after choosing the data source type, ODBC, and setting the credentials information in the data source dialog, be sure to insert the connection string directly in the RDL.)

Here is the connection string to use (be sure to change the path from "c:\" to location of your text files):

Driver={Microsoft Text Driver (*.txt; *.csv)};dbq=C:\CSVFiles\;defaultdir=C:\CSVFiles\;driverid=27;fil=text;maxbuffersize=2048;pagetimeout=5

As an example, create a file that contains the following, named flatfile.csv. Place this file in the location specified in your connection string.

File contents:
    Col1,Col2,Col3
    Hello,there,123

Now you can query this using this query string:

    Select * from "flatfile.csv"
0

Featured Post

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Set up your parameter at the report level as usual, check the box Multi-value, and set the Data Type to String 2. Set the Stored Procedure Parameter to varchar(max)  --<---- This part here is the key to it's success Example:    @cst_key var…
Hi, I am very much excited today since I'm going to share something very exciting Tool used for Analytical Reporting and that's nothing but MICROSTRATEGY. Actually there are lot of other tools available in the market for Reporting Such as Co…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question