Report's FilePath

Topics: Developer Forum
Jan 22, 2007 at 7:54 PM
First, I am pretty impressed with the code, and behavior of this tool, is definitely being incorporated into our daily build (MBuild) process. The only thing I ran into it dealt with how "Settings.CurrentDiretory" was sprinkled/re-used all over teh place, including when retrieving the list of reports from the config file. I think in most situations the Config and excutable will be in a different path from where the reports were developed. Because of how the code makes reference to the Settings.CurrentDiretory path and concatenates it to the <FilePath> defined in the config, then you can't use UNC paths or root paths, it assumes the *.rdl files are in the same/below the folder of the config/exe.
With one small modification to the Settings.cs file within the RSBuild.Core you can take care of that

//reportsi = new Report(rpName, string.Format("{0}{1}", Settings.CurrentDiretory, n11.InnerText), collapsedHeight, reportCacheTime);

reportsi = new Report(rpName, string.Format("{0}", n11.InnerText), collapsedHeight, reportCacheTime);
so now the <FilePath> inner text will be used instead, regardless of where the build process is occurring.