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?

Comments

  • edited 11:35AM
    Hello,

    Could you prepare a simple demo and send it to tz@fast-report.com?
  • edited 11:35AM
    AlexTZ wrote: »
    Hello,

    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.
  • edited 11:35AM
    Ok, I will try to fix it asap.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.