[英]Generating dynamic SAP Crystal Reports in Visual Studio 2010 VB.net SQL Server
I need to generate a report for a table like shown below 我需要为如下表生成报告
REGNO DATE YEAR BATCH H1 H2 H3 H4 H5 ATT
1138M0322 01-12-2013 3 1 A P P P P 2
1138M0324 01-12-2013 3 1 A P P P P 2
1138M0325 01-12-2013 3 1 A P P P P 2
1138M0329 01-12-2013 3 1 P P P P P P
1138M0331 01-12-2013 3 1 P P P P P P
I need to generate report where the date is 01-12-2013 and year is 3 and batch is 1 我需要生成日期为01-12-2013且年份为3且批次为1的报告
I added the table to the report. 我将表格添加到了报表中。 But I need to generate reports dynamically like said above. 但是我需要像上面所说的那样动态生成报告。 How can I do this 我怎样才能做到这一点
You need to use parameters. 您需要使用参数。 Create 3 parameters, one for date, one for year and one for batch. 创建3个参数,一个用于日期,一个用于年份,一个用于批处理。 Then in your selection formula you write "date = {dateParameter} and year {yearParameter} and batch = {batchParameter}. When you run the report it will ask you to enter the parameter values and then the report will show you the data that matches the parameters. 然后在您的选择公式中输入“ date = {dateParameter}和年份{yearParameter}和batch = {batchParameter}。运行报告时,系统会要求您输入参数值,然后报告将向您显示匹配的数据参数。
Hope that helps, 希望能有所帮助,
Chris 克里斯
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.