FastReport.Net. Registration of dataset

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-05 06:05:07

问题


I try register dataset by next code:

        ds = new DataSet();
        adapter.Fill(ds);
        ds.Tables.Add("test");

        report1.Load("report1.frx");
        report1.RegisterData(ds, "user_ds");
        report1.GetDataSource("test").Enabled = true;
        ((DataBand)report1.FindObject("Data1")).DataSource = report1.GetDataSource("test");
        report1.Show();

but get error on report1.Show();

(GroupHeader1): Error CS1525: Invalid expression term '['

GroupHeader1 contains single TextObject with "[Date]". What am I do wrong?


回答1:


Please check that a column with the name Date actually occurs in the dataset; furthermore, the dataset (that is, a table of the dataset) must also be assigned to the GroupHeader as a datasource.



来源:https://stackoverflow.com/questions/41179788/fastreport-net-registration-of-dataset

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!