HI All,
I've developed a software in vb6,ms-access and crystal report8.5. I've created package and everything is working fine. but the only problem is with report. I've used ODBC driver to connect crystal report with database. now when i designed reports my database was in my development folder of D: drive. I've installed my software in C:\program files folder. My database is in Database folder of my software's folder. I created an ODBC pointing to the installed path of my software. but it gives an error like "physical database not found" error. plz let me know how to solve this ASAP as today i've to finish all the things.
I've used following code to preview or print report
VB Code:
Dim rsInvoice As New ADODB.Recordset Dim sSQL As String Dim sName As String sSQL = "select * from qInvoice" Dim Report As CRAXDDRT.Report crInvoice.EnableDrillDown = False crInvoice.DisplayGroupTree = False crInvoice.DisplayTabs = False crInvoice.DisplayToolbar = False Set Report = New rptInvoice rsInvoice.CursorLocation = adUseClient rsInvoice.Open sSQL, cn With Report .DiscardSavedData .RecordSelectionFormula = "{tblPayment.receiptno} = '" & frmInvoice.txtInvoiceNo.Text & "'" .EnableParameterPrompting = False .Database.SetDataSource rsInvoice .Database.SetDataSource rsInvoice End With crInvoice.ReportSource = Report crInvoice.ViewReport Do While crInvoice.IsBusy DoEvents Loop crInvoice.Zoom 100
and while creating crystal report i used ODBC pointing to databse of my development folder which is different from my actual dabase folder path on installation.
Plz help me.
thanks in advance




Reply With Quote