Results 1 to 19 of 19

Thread: [RESOLVED] How to set database location via code in Crystal Report XI....?

Threaded View

  1. #1

    Thread Starter
    Member intellogo's Avatar
    Join Date
    Nov 2006
    Location
    India
    Posts
    61

    Resolved [RESOLVED] How to set database location via code in Crystal Report XI....?

    Hi..VBForumers,

    I am using the following items in my s/w....
    ------------------------------------------------------
    Reporting Toolkit: Crystal Report (CR 11).
    S/W Front End: Visual Basic 6.0 with Service Pack 6
    Back End RDBMS: Microsoft Access 2000
    ------------------------------------------------------

    I am almost done with CR 11 and its integration into my s/w. Great Thanks !! to some really experienced VBForumers.

    NEW ISSUE:
    =========
    I have successfully been able to create a Visual Basic 6 s/w which can generate reports based on user selected information from a form at runtime, with the criteria that CR 11 product is not required to be installed on the clien'ts / end-user's PC.

    But... just before the report is going to genereate itself, I get a dialog box window that pops-up asking for the exact location of the .MDB datbase file. This dialog box has a BROWSE button by which i can locate the database file manually, thus inturn the report is generated. I have attached an image showing this pop-up box.

    QUESTION:
    =========
    But this is not the way I want it to work. I mean why is it not getting the database location via code, even though i have used ....App.Path syntax ??

    This is not the only code, there's much more but I dont think that is related to this issue....
    Code:
    Dim rpt As New CRAXDDRT.Report
    rpt.Database.SetDataSource (App.Path & "\XYZ.mdb")
    .ReportSource
    .ViewReport
    Explanation:
    =========
    In the code snippet above, " rpt " is the Report object.

    The second line is the syntax i have used for locating the .MDB database file via code. Is it incorrect ??

    The ".ReportSource" & ".ViewReport" props display the report.

    Awaiting urgent response....
    Attached Images Attached Images  
    Regards,
    intellogo

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