Help on 'Too few parameters. Expected 2'
VB Code:
Private Sub btnShowReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowReport.Click
Dim mlogin As CrystalDecisions.Shared.TableLogOnInfo
Dim mTable As CrystalDecisions.CrystalReports.Engine.Table
Dim orpt As New crMasterReport
Dim pF As New ParameterFields ' This requires only one object
Dim pDate As New ParameterField ' ParameterField for 1st param
Dim pvDate As New ParameterDiscreteValue 'Parameter Value for 1st param
For Each mTable In orpt.Database.Tables
mlogin = mTable.LogOnInfo
mlogin.ConnectionInfo.ServerName = Application.StartupPath & "\ec_timer.mdb"
mlogin.ConnectionInfo.UserID = "Admin"
mlogin.ConnectionInfo.Password = "1024kb"
mTable.ApplyLogOnInfo(mlogin)
MsgBox(mlogin.ConnectionInfo.ServerName)
Next
orpt.SetParameterValue("d1", dtp1.Value.ToShortDateString & " 00:00:01")
orpt.SetParameterValue("d2", dtp2.Value.ToShortDateString & " 23:59:59")
crv.ReportSource = orpt
crv.Height = Me.Height
crv.Width = Me.Width
Please help me on this.. Everytime I run my program using VB.net it executes fine and also if I run the program within the DEBUG folder it executes fine. The problem is that whenever I move the EXE file It gives the error 'too few parameters. Expected 2.' see image below:
http://i9.photobucket.com/albums/a57...port_error.jpg