DataSet
Hi Guys,
I've got a suite of vb.net programs which work against a SQL server database and they use Datasets specified in the Visual Studio project. The FastReport sections work fine off these datasets but i'm now faced with a problem.
This is all fine in a development environment but I want to shift to a production environment where the datasets, connection strings etc are not specified within the project. I've got the rest of the suite working fine but want to know how to use FastReports where your not showing up a dataset within the Visual studio dev but create one with code.
Anyone have any experience of this?
Thanks
I've got a suite of vb.net programs which work against a SQL server database and they use Datasets specified in the Visual Studio project. The FastReport sections work fine off these datasets but i'm now faced with a problem.
This is all fine in a development environment but I want to shift to a production environment where the datasets, connection strings etc are not specified within the project. I've got the rest of the suite working fine but want to know how to use FastReports where your not showing up a dataset within the Visual studio dev but create one with code.
Anyone have any experience of this?
Thanks
Comments
Hi BrianF
You can find that somewhere but if you like answer here then try something like that:
protected void WebReport_StartReport(object sender, EventArgs e)
{
var rConn = WebReport.Report.FindObject("Connection");
if (rConn is MsSqlDataConnection)
{
((MsSqlDataConnection) rConn).ConnectionString = db.ConnectionString;
}
}
Where db is your db in project.
Regards
Daniel
Great post! It's very nice. Thank you so much for your post.