Results 1 to 3 of 3

Thread: Connection path in data report designer

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    2

    Connection path in data report designer

    Hi,

    I'm designing reports in VB using data report designer.

    For connection in data environment designer, I'm specifying the path via "Data Link properties window" (By specifying provider and database location). However, this becomes a fixed path. I mean, after generating exe file, I would like to place database and exe file alone in separate folder. However, data environment designer connection still tries to get data from old location...and if database is deleted, it gives error while generating report.

    For rest of my VB program, I'm reading a path.ini file in Module section--which facilitates me keeping database anywhere.

    Can someone kindly suggest a solution which makes data report also take connection path from path.ini file??

    Note: I tried to give dataenvironment.connection.provider = "Microsoft.Jet.OLEDB.4.0", but I'm getting error saying that a provider is already supplied. When it is echoed thru msgbox, it is showing as MSDatashape as provider name.

    Any help in this regard will be greatly appreciated. Thank you in advance.

    Kiran

  2. #2
    Member
    Join Date
    Oct 2005
    Posts
    52

    Re: Connection path in data report designer

    Dim CRtables As CrystalDecisions.CrystalReports.Engine.Tables
    Dim crTable As CrystalDecisions.CrystalReports.Engine.Table

    CRtables = rptCrewRecord.Database.Tables()


    rptCrewRecord.Load(System.Windows.Forms.Application.StartupPath & "\..\CrystalRpt_opt4.rpt")
    CRtables = rptCrewRecord.Database.Tables()
    CRtablesMAIN = rptCrewRecord.Database.Tables()

    For Each crTable In CRtables
    ' MsgBox("table name :" & crTable.Name)
    crTable.Location = System.Windows.Forms.Application.StartupPath & "\..\REPORTS_DB\consolidated.mdb"
    Next

    Hope this helps...in my case the report files are in a folder one up from the executable file.

  3. #3

    Thread Starter
    New Member
    Join Date
    Sep 2006
    Posts
    2

    Re: Connection path in data report designer

    Thank you 'rockadudele' for your prompt reply.

    But I'm looking for such solution with Data Report Designer in VB. I'm not much familiar with crystal reports. However, I shall try whether similar solution is possible in data report designer.

    If you can suggest specific solution for data report designer, I'll be very happy.

    Kiran

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