Results 1 to 1 of 1

Thread: Report's database path

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2002

    Report's database path

    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:
    1. Dim rsInvoice As New ADODB.Recordset
    2.     Dim sSQL As String
    3.     Dim sName As String
    7.     sSQL = "select * from qInvoice"
    8.     Dim Report As CRAXDDRT.Report
    10.     crInvoice.EnableDrillDown = False
    11.     crInvoice.DisplayGroupTree = False
    12.     crInvoice.DisplayTabs = False
    13.     crInvoice.DisplayToolbar = False
    14.     Set Report = New rptInvoice
    15.     rsInvoice.CursorLocation = adUseClient
    16.     rsInvoice.Open sSQL, cn
    17.     With Report
    18.         .DiscardSavedData
    19.         .RecordSelectionFormula = "{tblPayment.receiptno} = '" & frmInvoice.txtInvoiceNo.Text & "'"
    20.         .EnableParameterPrompting = False
    21.         .Database.SetDataSource rsInvoice
    22.         .Database.SetDataSource rsInvoice
    23.     End With
    24.     crInvoice.ReportSource = Report
    25.     crInvoice.ViewReport
    26.     Do While crInvoice.IsBusy
    27.         DoEvents
    28.     Loop
    29.     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
    Last edited by damini_dd; Apr 19th, 2006 at 08:55 AM. Reason: to add source code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width