change stimulsoft report .mrt file from C# program
Posted: Fri Jan 11, 2013 9:45 am
Hello!
How can I change stimulsoft report .mrt file from C# program? I want to change connection string in all my .mrt files. This is my code:
string path = "C:\\Users\\";
try{
DirectoryInfo dir = new DirectoryInfo(path);
foreach (FileInfo file in dir.GetFiles())
{
StiReport report = new StiReport();
report.Load(file.Name);
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("EiszConn", "EiszConn", "NewConnectionString", false));
}
But it doesn't work. Connection strings are still the same.
How can I change stimulsoft report .mrt file from C# program? I want to change connection string in all my .mrt files. This is my code:
string path = "C:\\Users\\";
try{
DirectoryInfo dir = new DirectoryInfo(path);
foreach (FileInfo file in dir.GetFiles())
{
StiReport report = new StiReport();
report.Load(file.Name);
report.Dictionary.Databases.Clear();
report.Dictionary.Databases.Add(new Stimulsoft.Report.Dictionary.StiSqlDatabase("EiszConn", "EiszConn", "NewConnectionString", false));
}
But it doesn't work. Connection strings are still the same.