当前位置: 代码迷 >> ASP.NET >> asp.net2005中的web项目使用reportviewer控件连接rdlc报表,如何传参数
  详细解决方案

asp.net2005中的web项目使用reportviewer控件连接rdlc报表,如何传参数

热度:9979   发布时间:2013-02-26 00:00:00.0
asp.net2005中的web项目使用reportviewer控件连接rdlc报表,怎么传参数
asp.net2005中的web项目使用reportviewer控件连接rdlc报表,而数据集xsd是使用创建向导建立的,里面的select     sql语句是这样:    
select     *     from     ddmb     where     dw=@dw     and     year_month=@year_month    
可是这两个参数怎么传进来阿?

还有怎么动态添加数据集,就是不使用创建向导建立,用代码建立?


------解决方案--------------------------------------------------------
我是用objectdatasource来传参数的
ReportViewer1.ProcessingMode = ProcessingMode.Local;
ReportViewer1.LocalReport.ReportPath = Server.MapPath( "Reports/ContractQuery.rdlc ");
ObjectDataSource ods = new ObjectDataSource( "MDCLib ", "QueryContract ");
QueryStringParameter para = new QueryStringParameter( "QueType ", TypeCode.String, "reportid ");
para.DefaultValue = "0 ";
ods.SelectParameters.Add(para);
ReportViewer1.LocalReport.DataSources.Add(new ReportDataSource( "mdc_ExpireContract_MDC_ExpireContract ", ods));
------解决方案--------------------------------------------------------
不顶不行!
------解决方案--------------------------------------------------------
帮顶来了,学习一下
------解决方案--------------------------------------------------------
qq:526585993
  相关解决方案