How to register BindingSource?
Report's method RegisterData can't directly register BindingSource, I use method Report.RegisterData(IEnumerable data, string name, BOConverterFlags flags, int maxNestingLevel), because BindingSource implement interface IEnumerable, everything is well, but textObject's value is null, why?
It's very important for my project to support BindingSource, how to do it?
It's very important for my project to support BindingSource, how to do it?
Comments
Could you prepare a simple demo and send it to tz@fast-report.com?
Hello,
my demo is very simple, I modify FastReport.Net's Demo Form1 like following, add three line code, then i use new source in any report, but textObject display empty.
//I add this line for test BindingSource.
private BindingSource FSource;
private void Form1_Load(object sender, EventArgs e)
{
FindReportsFolder();
FReport = new Report();
FReport.Preview = previewControl1;
Config.ReportSettings.ShowPerformance = true;
FDataSet = new DataSet();
FDataSet.ReadXml(FReportsFolder + "nwind.xml");
//I add this line for test BindingSource.
FSource = new BindingSource(FDataSet, "Orders");
........
}
private void RegisterData()
{
FReport.RegisterData(FDataSet, "NorthWind");
//I add this line for test BindingSource.
FReport.RegisterData(FSource, "OrderSource", BOConverterFlags.BrowsableOnly, 3);
......
}
thanks.