report - not follow with the query given
here's my vb code...
Code:
''VIEW/GENERATE CRYSTAL REPORT
With cr
.Connect = " DSN=" & sql_odbc & "; " & _
" uid=" & sql_user & "; " & _
" pwd=" & sql_pass & "; " & _
" database=" & sql_db & "; "
.ReportTitle = "noisterCall 1.0 - Report"
.WindowTitle = "noisterCall 1.0 - Report"
.WindowShowPrintBtn = True
.WindowShowExportBtn = True
'restriction
'If strUserType = 5 Then .WindowShowExportBtn = False: .WindowShowPrintBtn = False
.SQLQuery = strQry
.Destination = crptToWindow
'show
.ReportFileName = App.Path & "\report\" & strReportFile
'MsgBox App.Path & "\" & strReportFile
'.ReportSource = crptDataControl
.PrintReport
If CInt(.LastErrorNumber) > 0 Then MsgBox .LastErrorNumber & ": " & .LastErrorString, vbCritical, "noisterCall"
'MsgBox App.Path & "\" & strReportFile
End With
don't know why it's not following my query given... it shows the same with when i design the report on Crystal Report app.
please help. any help really appreciated.
Re: report - not follow with the query given
SqlQuery doesn't change in the report and still point to the database of the odbc indicated in the report at design time.