我正在使用VS 2008和SQL 2008,我试图用Report参数创建报表。我完全是这个概念的新手,所以我试图开发使用各种新闻中所显示的基本步骤。无法使用报表查看器加载报表Visual Studio 2008
1>连接到数据集
2-配置服务器
3 - 表适配器
4 - 添加新的报告
5 - 在报告屏幕拖动表并添加列
6 *我在这里添加参数(fromdate,todate)。请告诉我我在做什么错误
我得到报告 - > ReportParamaters - >添加新参数 - > fromdate - >类型:日期时间。 (与Todate相同)
7 - >在网页中。新增2个文本框和按钮
8 - >拖的ReportViewer - >选择Datasoure背后报告名称
现在的代码。
在点击按钮
Protected Sub btnView_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnView.Click
Try
setReportParameters()
Me.ReportViewer1.LocalReport.Refresh()
Catch ex As Exception
End Try
End Sub
Private Sub setReportParameters()
Dim Fromdate As New ReportParameter("Fromdate", tbFromDate.Text)
Dim Todate As New ReportParameter("Todate", tbtodate.Text)
Me.ReportViewer1.LocalReport.SetParameters(New ReportParameter() {Fromdate, Todate})
End Sub
当我运行的报告,我得到这个错误之后
“
An error occurred during local report processing.
Error during processing of ‘FromDate’ report parameter.
所有我能看到的是我点击文本框和Button.When它,什么也没有发生......
请帮忙
“
Well..I改变没有fromdate到FROM日期......同时,也是Datetime.but它抛出了同样的错误:( – user1141927 2012-04-10 02:32:36