How to set Database Path(Access) for Crystal Report XI by coding in VB

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shrividya
    New Member
    • Feb 2008
    • 2

    How to set Database Path(Access) for Crystal Report XI by coding in VB

    Hello,

    How to set Database Path(Access) for Crystal Report XI by coding in VB.

    I am setting the path during Crystal Report Design but if i install the software on client's PC the path is changed &the report is not generated showing the file not found error

    Plz someone guide me to comeout from this problem.
    Shrividya
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Try to use App.Path for the purpose..

    Comment

    • QVeen72
      Recognized Expert Top Contributor
      • Oct 2006
      • 1445

      #3
      Hi,

      Before you view Report, Set the Location of all the tables used in the report using this code:
      I dont know about CRXI, it works for CR9.0

      [code=vb]
      Dim i As Integer

      'Open m_Report

      For i = 1 To m_Report.Databa se.Tables.Count - 1
      With m_Report.Databa se.Tables(i)
      .Location = "D:\NewPath\New DB.mdb"
      End With
      Next
      ' Code to view report in the viewer..
      [/code]

      Regards
      Veena

      Comment

      Working...