FastReport.Net.数据集注册 [英] FastReport.Net. Registration of dataset

查看:52
本文介绍了FastReport.Net.数据集注册的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试通过下一个代码注册数据集:

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();

但是在report1.Show()上出错;

but get error on report1.Show();

(GroupHeader1): 错误 CS1525: 无效的表达式术语 '['

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

GroupHeader1 包含带有[Date]"的单个 TextObject.我做错了什么?

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

推荐答案

请检查数据集中是否确实出现了名称为Date的列;此外,数据集(即数据集的表)也必须分配给GroupHeader作为数据源.

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.

这篇关于FastReport.Net.数据集注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆