PRAISE PHS
Well-known member
- Joined
- Jun 2, 2011
- Messages
- 58
- Programming Experience
- Beginner
Hi All,
I created am MS Report with VS 2008 and Sql Server 2005 on my personal machine. I created three parameters for client's name, fromDate and toDate. On this report I have a textbox and two datetimepicker controls. The textbox is used to track the clients' names while the datetimepicker is used to filter the report by date. This report is working fine on my personal machine which has my working environment. But whenever I deploy this windows app on the server then run it. My report viewer doesn't work. The app keeps popping up error message("THE fromDate PARAMETER IS MISSING A VALUE" and also shows "AN ERROR OCCURRED DURING LOCAL REPORT PROCESSING").
Pls kindly help out with this issues. Below are my codes.
I created am MS Report with VS 2008 and Sql Server 2005 on my personal machine. I created three parameters for client's name, fromDate and toDate. On this report I have a textbox and two datetimepicker controls. The textbox is used to track the clients' names while the datetimepicker is used to filter the report by date. This report is working fine on my personal machine which has my working environment. But whenever I deploy this windows app on the server then run it. My report viewer doesn't work. The app keeps popping up error message("THE fromDate PARAMETER IS MISSING A VALUE" and also shows "AN ERROR OCCURRED DURING LOCAL REPORT PROCESSING").
Pls kindly help out with this issues. Below are my codes.
VB.NET:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports Microsoft.Reporting.WinForms
Private Sub btnPrev_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrev.Click
Try
ReportViewerArk.Visible = True
Me.BankTransportExpTableAdapter.Fill(Me.ATMTechDBDataSet1.BankTransportExp, Integer.Parse(arst), dtpFrom.Text, dtpTo.Text)
Dim reportData As New ReportDataSource("ATMTechDBDataSet1_BankTransportExp", Me.ATMTechDBDataSet1.BankTransportExp)
Me.ReportViewerArk.LocalReport.ReportPath = Application.StartupPath & "\\BankTExpReport.rdlc"
ReportViewerArk.LocalReport.DataSources.Clear()
ReportViewerArk.LocalReport.DataSources.Add(reportData)
With ReportViewerArk
Dim lparam As New ReportParameter("ComParam", arst1 & " Transport Expenses")
Dim lparam1(0) As ReportParameter
lparam1(0) = lparam
.LocalReport.SetParameters(lparam1)
Dim FromParam As New ReportParameter("FromDate", dtpFrom.text)
Dim FromParam1(0) As ReportParameter
FromParam1(0) = FromParam
.LocalReport.SetParameters(FromParam1)
Dim ToDate As New ReportParameter("ToDate", dtpTo.text)
Dim ToDate1(0) As ReportParameter
ToDate1(0) = ToDate
.LocalReport.SetParameters(ToDate1)
.LocalReport.Refresh()
End With
ReportViewerArk.LocalReport.Refresh()
ReportViewerArk.RefreshReport()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub