SSRS - Importing data from a CSV file to use as a data source on a report server

限于喜欢 提交于 2021-02-07 08:50:36

问题


I am hoping that someone could help me with my problem. I am able to make a local connection to a csv file and import it and use the data within the report. One problem is when I put the report onto a report server. It can't access the file on the local machine.

Would anyone know of a way, possibly using ODBC, to allow the report on the server to view the CSV file on the local machine?


回答1:


You can use an ODBC connection to connect to a CSV file. You just need to point the ODBC connection at the folder the files are in:

Provider=Microsoft.Jet.OLEDB.4.0;Data Source="\\\\SERVER_NAME\\FOLDER_NAME\\SUB_FOLDER_NAME";Extended Properties="text;HDR=YES;FMT=Delimited"

(Note the double backslashes and header property HDR)

Then select from the filename in your query:

SELECT * FROM FILENAME.TXT


来源:https://stackoverflow.com/questions/29296929/ssrs-importing-data-from-a-csv-file-to-use-as-a-data-source-on-a-report-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!