Hi there.
I built the following code to run a report:
Private Sub cmdTest_Click()
If Not IsNull(txtDateFrom) Or (txtDateFrom <> "") Then
DataEnvironment1.Command2 txtDateFrom.Text
DataReport2.Show
End If
End Sub
When I run it displays the report strait away but if I try to run another report it gives a Run-time error '3705' saying: Operation not allowed when the objects is open.
If after or before the line saying dataReport2.Show I insert the following line: DataEnvironment1.rsCommand2.Close I get another error saying: Prepared statment '(@P1 nvarchar(50))SELECT tblP.switchname, tblN.NNI, tblB' expects parameter @P1, which was not suplied.
Is there anyone that could tell me what I'm doing wrong or tell me the steps to run a report?
Thansk
I built the following code to run a report:
Private Sub cmdTest_Click()
If Not IsNull(txtDateFrom) Or (txtDateFrom <> "") Then
DataEnvironment1.Command2 txtDateFrom.Text
DataReport2.Show
End If
End Sub
When I run it displays the report strait away but if I try to run another report it gives a Run-time error '3705' saying: Operation not allowed when the objects is open.
If after or before the line saying dataReport2.Show I insert the following line: DataEnvironment1.rsCommand2.Close I get another error saying: Prepared statment '(@P1 nvarchar(50))SELECT tblP.switchname, tblN.NNI, tblB' expects parameter @P1, which was not suplied.
Is there anyone that could tell me what I'm doing wrong or tell me the steps to run a report?
Thansk