-
simple report
hi to all.
i have the following code calling a report created in crystal report using odbc connection.
Code:
cr.Connect = "ODBCDBName"
cr.SQLQuery = "Select * TableName"
cr.ReportFileName = App.path & "ReportFile.rpt"
cr.PrintReport
but the problem is that the report does not show up. why is it?
noister
-
Re: simple report
Probably because of missing \ in path :
Code:
cr.ReportFileName = App.path & "\ReportFile.rpt"
-
Re: simple report
here's my current code now...
Code:
cr.Connect = strODBCDB
cr.SelectionFormula = ""
cr.ReportFileName = StrReportFile
cr.WindowShowPrintSetupBtn = True
cr.WindowShowRefreshBtn = True
cr.WindowState = crptMaximized
cr.Action = 1
error: Run-time error '20599'
Cannot Open SQL server.