August 17, 2009 at 12:30 pm
I want to use SQLServer 2008 Reporting Services(subscriptions) to report a specific missing file on the file system (network drive). I am using a query to retrieve the path. I used the folleowing in the textbox expression
=IIf(System.IO.File.Exists(Fields!DXFFile.Value),"True","False")
But I am always returning "False" even if the file exists. Why? Any help figuring out how to check if the file exists?
Thanks a lot !
Bazim
August 17, 2009 at 2:26 pm
I'm sorry to be a little obtuse, but I was unaware you could use things like system.io in expressions?
Also, I need to ask WHY you would do this in a report?
I think we need a bit more detail.
CEWII
August 17, 2009 at 2:49 pm
I tried referencing assemblies .dll/codes (function to check if file exists) with the same results (False).
We have people creating .dxf files for specific production units and dumping these files on a network drive. I am trying to see if I can check these drives to report (via Reporting Services subscriptions) any units where the associated files are missing.
August 18, 2009 at 8:52 pm
You might want to go about this in a different way where you have a sproc do a dir on a directory and get the data and store it. I just don't thing this is the best way. You could also build a SQL CLR object to do this VERY easily..
CEWII
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply