问题
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