How to bind to datatable?
Posted: Tue Dec 23, 2008 11:38 pm
Hello.
Currently I'm looking for good reporting system for .NET and decided to try Stimulsoft Report.
Now I have one question. How to bind my report to my DataTable.
Here is a code of simple application
as you can see I declared table and fill it in forms load event. Report already designed to use DataSet1.ViewOpers . But I can not use this
viewOpersTableAdapter.Fill(dataSet11.ViewOpers);
don't ask why
I just need to know the way. How to assign my current table as datasource for my report. In our application we have a lot of MDI forsm so we can not use Fill method to fill data directly in DataSet. Each for must use its own datatable
Currently I'm looking for good reporting system for .NET and decided to try Stimulsoft Report.
Now I have one question. How to bind my report to my DataTable.
Here is a code of simple application
Code: Select all
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
DataSet1.ViewOpersDataTable table = new DataSet1.ViewOpersDataTable();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
table = viewOpersTableAdapter.GetData();
viewOpersBindingSource.DataSource = table;
}
private void button1_Click(object sender, EventArgs e)
{
stiReport1.Show(true);
}
}
}
viewOpersTableAdapter.Fill(dataSet11.ViewOpers);
don't ask why
