FastReport.Net. Registration of dataset

1.5k views Asked by At

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

There are 1 answers

1
Codor On

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.