Crystal Report Viewer Control problem ^^"
I have problem with Crystal Report Viewer
Control(V 8.5). I create .rpt file with OLEDB
technology. But When I load form with
CRViewer. I see error message(Server has
not yet been opened).But when i change to
use crystal report control(crystl32.ocx) and
Create .rpt with odbc technology and use method(Connect) of crystal Report Control by DSN method . Same SQL are WORK.
My environment
- Window 2000 advance Server
- Crystal Report 8.5 developer Edition (SP2)
- sql Server 2000 Enterprise
'****************** mycode
Dim objApp As CRAXDRT.Application
Dim objReport As CRAXDRT.Report
Firstday = Format(MonthBegin
(DF_date), "yyyy, mm, dd, 00, 00, 00")
Lastday = Format(MonthEnd
(DF_date), "yyyy, mm, dd, 23, 59, 59")
Set objApp = New CRAXDRT.Application
Set objReport = objApp.OpenReport
("E:\personelPRJ\report\oleRPT.rpt")
SQL = "{workdata.humanId} = '" &
frmprint_humanId & "' and
{workData.todayDate} in DateTime (" &
Firstday & ") to DateTime (" & Lastday & ")"
With CRViewer1
objReport.RecordSelectionFormula = SQL
.ReportSource = objReport
.EnableGroupTree = False
.ViewReport
End With
Set objApp = Nothing
Set objReport = Nothing
'**************************
help me please >(=^_^=)<
Thanks.
Tk.
tk
|