lucia
November 12th, 2007, 04:03 PM
I am using vb6 and sql server 2000 and CR9.
I need select data from database and show it on CR.
I have code related to CR like this:
Code:
Dim crReport As New CRAXDRT.Report
Dim adoRS As New ADODB.Recordset
Dim strConnection As String, strReport As String
strConnection = "Driver={SQL Server};" & _
"Server=" & gsSQL & ";" & _
"Database=" & gsDatabaseName & ";" & _
"Uid=" & gstrUsr & ";" & _
"Pwd=" & gstrPwd
Set Report = crApp.OpenReport("\\development\Reports\" & strReport)
Set adoRS = New ADODB.Recordset
adoRS.Open "Temp_SQL", strConnection, adOpenDynamic, adLockBatchOptimistic
crReport.Database.Tables(1).SetDataSource adoRS, 3
Temp_SQL is a view to collect all data we want. I got all data I want but only half (or less) data shown on the report.
Any input will be highly appreciated.
I need select data from database and show it on CR.
I have code related to CR like this:
Code:
Dim crReport As New CRAXDRT.Report
Dim adoRS As New ADODB.Recordset
Dim strConnection As String, strReport As String
strConnection = "Driver={SQL Server};" & _
"Server=" & gsSQL & ";" & _
"Database=" & gsDatabaseName & ";" & _
"Uid=" & gstrUsr & ";" & _
"Pwd=" & gstrPwd
Set Report = crApp.OpenReport("\\development\Reports\" & strReport)
Set adoRS = New ADODB.Recordset
adoRS.Open "Temp_SQL", strConnection, adOpenDynamic, adLockBatchOptimistic
crReport.Database.Tables(1).SetDataSource adoRS, 3
Temp_SQL is a view to collect all data we want. I got all data I want but only half (or less) data shown on the report.
Any input will be highly appreciated.