我已经搜索了这个,我没有找到我正在寻找的答案。c#.net报告服务动态创建.rdlc报告的可选页脚
我正在用C#.NET和Visual Studio 2008编写Windows窗体程序。我正在使用Reporting Services并使用.net提供的报告查看器呈现报告。报告的数据源是SQL Server。我在本地呈现报告。我没有使用报表服务器。这些报告是.rdlc文件。
我想以编程方式根据用户在窗体中的输入将页脚添加到报表(而不是表脚)。我知道如何从Windows窗体传递参数给报表。我不知道如何使用这种技术或其他技术来动态创建或删除页脚。当在页面上创建页脚时,我需要添加文本。
目前我有一个永久页脚,其中包含通过向报表查看器传递参数来填充的文本框。
List<ReportParameter> parameters = new List<ReportParameter>();
parameters.Add(new ReportParameter("FootnoteLine1", FootnoteLine1.ToString()));
parameters.Add(new ReportParameter("FootnoteLine2", FootnoteLine2.ToString()));
reportViewer1.LocalReport.SetParameters(parameters);
任何帮助表示赞赏。