报表查看器 .rdlc 如何传递参数? [英] Report Viewer .rdlc How to pass a parameter?
问题描述
显然我一直在用 C# windows 形式做一个试算表报告 - 报告查看器显示帐户"的年度报告;以及每个账户的应付总额.
So apparently I been doing a trial balance report in C# windows form - report viewer that shows a YEARLY report of "ACCOUNTS" and its total payable in each account.
该报告有一个假设的年度复合值,具体取决于用户的选择 -例如 一月.1 2013 年至 2 月2014 年 1 月 1 日
,Jan-Dec 2013 年将有一个复合值,TOTAL=4,500,000";和 2014 年 1 月至 2 月,TOTAL=45,000
".
The report has a supposed yearly compounding value depending from the user choice -
ex. Jan. 1 2013-to-Feb. 1 2014
, there will be a compounding value from Jan-Dec 2013, "TOTAL=4,500,000" and Jan-Feb 2014, "TOTAL=45,000
".
我在报告中得到的是一个持续的复合价值,
What I have in the report is a continues compounding value,
2013 年 1 月至 12 月,总计 = 4,500,000";和 2014 年 1 月至 2 月,总计 = 4,545,000".
我在单元格中的代码是 =RunningValue(Fields!DEBIT.Value,Sum,summaryDataSet").
My code in the cell is =RunningValue(Fields!DEBIT.Value,Sum,"summaryDataSet").
我希望读者能理解我在这里想说的内容并帮助我.谢谢.
I hope the reader would understand what I'm trying to say here and help me. Thanks.
推荐答案
虽然我不知道是什么让您无法使用 Google 找到问题的答案(我指的只是问题的标题!),但您可以使用 ReportParameter
将参数传递给您的报告:
Though I don't know what kept you from using Google to find an answer to the question (by that I mean the question's header only!), you can use ReportParameter
to pass parameters to your report:
ReportParameter[] parameters = new ReportParameter[x+1];
parameters[0] = new ReportParameter("name1", value1);
...
parameters[x] = new ReportParameter("namex", valuex);
this.reportViewer1.LocalReport.SetParameters(parameters);
我不明白你想通过问题文本告诉我们什么,它似乎根本不适合问题......
I do not understand what you're trying to tell us by the question text, it does not seem to fit the question at all...
这篇关于报表查看器 .rdlc 如何传递参数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!