FastReport.Net. Registration of dataset

2019-08-06 03:21发布

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条回答
孤傲高冷的网名
2楼-- · 2019-08-06 04:17

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.

查看更多
登录 后发表回答