Programmatically change DB name for .FRX report

Hi folks,

could you please tell me if it is possible to programmatically (C#) change the connection string for a .FRX template?

We would like to provide our customers with some FRX template within our application but since these datasets refer to a MS SQL Server DB, we should provide the possibility to change the Database name...
Can we override the DB name information present in the DataSet?

regards!

Giovanni

Comments

  • edited 6:03PM
    Hello! You can unregister old and to register new datasourse:
    Report r = new Report();
                r.GetDataSource("name").Delete();
    report.RegisterData(dataset, "ds_name");
    

Leave a Comment