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.
change stimulsoft report .mrt file from C# program
Re: change stimulsoft report .mrt file from C# program
Hello.
You don't save the report templates. Add the report.Save() method.
Thank you.
You don't save the report templates. Add the report.Save() method.
Thank you.
Re: change stimulsoft report .mrt file from C# program
Oh, you are right. Thanks a lot!
Re: change stimulsoft report .mrt file from C# program
Hello.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.
We are always glad to help you.
Let us know if you need any additional help.
Thank you.