简体   繁体   English

在带有ODBC的SSRS中使用.CSV作为数据源:数据集可以查询列,但运行时报表无法连接到数据源

[英]Using .CSV as datasouce in SSRS w/ ODBC: Dataset can query columns, but report can't connect to datasource when run

Application: Report Builder Connection Type: ODBC 应用程序:报表生成器连接类型:ODBC

I am attempting to connect to, and query a csv using SSRS. 我正在尝试使用SSRS连接到并查询csv。 I've added a system DSN, and am able to successfully connect when I click the "Test Connection" button on the "Connection Properties" window. 我已经添加了系统DSN,并且在单击“连接属性”窗口上的“测试连接”按钮时能够成功连接。 However when I click the same button within the "Data Source Properties" window, I get the error message below. 但是,当我在“数据源属性”窗口中单击相同的按钮时,出现以下错误消息。

ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified 错误[IM002] [Microsoft] [ODBC驱动程序管理器]找不到数据源名称,并且未指定默认驱动程序

What's strange is that I created a dataset with a simple SELECT * query FROM [csvfilename], and it successfully displays all the fields from my csv. 奇怪的是,我使用简单的SELECT *查询来自[csvfilename]的数据集创建了数据集,并成功显示了csv中的所有字段。 I therefore know it can access it. 因此,我知道它可以访问它。 When I try to run the report, however, I get the error below. 但是,当我尝试运行报告时,出现以下错误。

Cannot create a connection to data source '[DataSource Name]' (rsErrorOpeningConnection) 无法创建到数据源'[DataSource Name]'的连接(rsErrorOpeningConnection)

Here is the Connection String I'm using within my DataSource: 这是我在数据源中使用的连接字符串:

Dsn=WIPEXPORT;Driver=Microsoft Text Driver (*.txt;dbq=I:\\HARVEST\\DATA BROWSERS\\WIPEXPORT;defaultdir=I:\\HARVEST\\DATA BROWSERS\\WIPEXPORT;driverid=27;fil=text;maxbuffersize=2048;maxscanrows=8;pagetimeout=5;safetransactions=0;threads=3;usercommitsync=Yes

I apologize if this has already been answered. 如果这个问题已经得到解答,我深表歉意。 I couldn't seem to find anyone with my specific problem. 我似乎找不到任何与我的特定问题有关的人。

So after trying just about every connection string configuration within ReportBuilder, I ended up switching to VisualStudio where it worked immediately. 因此,在尝试了ReportBuilder中几乎所有的连接字符串配置之后,我最终切换到了VisualStudio,它立即可以工作。 I even copied the successful connection string from VS back to RB and RB was still broken. 我什至将成功的连接字符串从VS复制回RB,而RB仍然断开。 Don't know if it's my RB installation or what, but at least it works now. 不知道这是我的RB安装还是什么,但至少现在可以使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM