i've a problem with crystal reports. i can't open my report. i'm using the following code
Private Sub mnuFilesRptCL_Click()
Dim strRptFullName As String
Dim strRptName As String
Screen.MousePointer = 11
'MsgBox App.Path
strRptFullName = App.Path & "\Reports\ClientListRpt.rpt"
With CtrlCryport
.WindowTitle = "Client List"
.ReportFileName = strRptFullName
.Connect = gDB.getDSNString
.ReportTitle = "Customers List"
.ParameterFields(0) = "CompanyName1;" & RPT_COMPANY_LINE_1 & ";True"
.ParameterFields(1) = "CompanyName2;" & RPT_COMPANY_LINE_2 & ";True"
.ParameterFields(2) = "CompanyAddress;" & RPT_COMPANY_LINE_3 & ";True"
.ParameterFields(3) = "ReportFooter;" & "" & ";True"
.ParameterFields(4) = "CSType;" & "CU" & ";True"
.Action = 1
.WindowState = crptMaximized
.PageZoom (100)
End With
Screen.MousePointer = 0
End Sub
i'm getting an error at the ".Action=1" line. i checked the connection also. the connection is established.
This is working correctly in my system, but when i try to run the same code in another system, this is not working.
pls help me to fix this.
Private Sub mnuFilesRptCL_Click()
Dim strRptFullName As String
Dim strRptName As String
Screen.MousePointer = 11
'MsgBox App.Path
strRptFullName = App.Path & "\Reports\ClientListRpt.rpt"
With CtrlCryport
.WindowTitle = "Client List"
.ReportFileName = strRptFullName
.Connect = gDB.getDSNString
.ReportTitle = "Customers List"
.ParameterFields(0) = "CompanyName1;" & RPT_COMPANY_LINE_1 & ";True"
.ParameterFields(1) = "CompanyName2;" & RPT_COMPANY_LINE_2 & ";True"
.ParameterFields(2) = "CompanyAddress;" & RPT_COMPANY_LINE_3 & ";True"
.ParameterFields(3) = "ReportFooter;" & "" & ";True"
.ParameterFields(4) = "CSType;" & "CU" & ";True"
.Action = 1
.WindowState = crptMaximized
.PageZoom (100)
End With
Screen.MousePointer = 0
End Sub
i'm getting an error at the ".Action=1" line. i checked the connection also. the connection is established.
This is working correctly in my system, but when i try to run the same code in another system, this is not working.
pls help me to fix this.