VB Code:
  1. Private Sub btnShowReport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnShowReport.Click
  2.         Dim mlogin As CrystalDecisions.Shared.TableLogOnInfo
  3.         Dim mTable As CrystalDecisions.CrystalReports.Engine.Table
  4.         Dim orpt As New crMasterReport
  5.  
  6.  
  7.         Dim pF As New ParameterFields ' This requires only one object
  8.         Dim pDate As New ParameterField ' ParameterField for 1st param
  9.         Dim pvDate As New ParameterDiscreteValue 'Parameter Value for 1st param
  10.  
  11.         For Each mTable In orpt.Database.Tables
  12.             mlogin = mTable.LogOnInfo
  13.             mlogin.ConnectionInfo.ServerName = Application.StartupPath & "\ec_timer.mdb"
  14.             mlogin.ConnectionInfo.UserID = "Admin"
  15.             mlogin.ConnectionInfo.Password = "1024kb"
  16.             mTable.ApplyLogOnInfo(mlogin)
  17.             MsgBox(mlogin.ConnectionInfo.ServerName)
  18.         Next
  19.  
  20.         orpt.SetParameterValue("d1", dtp1.Value.ToShortDateString & " 00:00:01")
  21.         orpt.SetParameterValue("d2", dtp2.Value.ToShortDateString & " 23:59:59")
  22.         crv.ReportSource = orpt
  23.  
  24.         crv.Height = Me.Height
  25.         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: