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?
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 theGroupHeader
as a datasource.