• We just launched and are currently in beta. Join us as we build and grow the community.

Crystal Reports Tutorial Update

fbiggroup

Crash Log Analyst
F Rep
0
0
0
Rep
0
F Vouches
0
0
0
Vouches
0
Posts
117
Likes
91
Bits
2 MONTHS
2 2 MONTHS OF SERVICE
LEVEL 1 200 XP
Recently I receive a comment on the database path error. This error occurs because the database location is not relative to the application path. In our example on How to Print Using Crystal Reports the base path for the application is located under the debug folder.

For the sake of this tutorial I move the database within the data folder relative to the debug folder to avoid any error.

In addition the following code has been added to call the database path.

  1. Dim

    tbCurrent As

    CrystalDecisions.

    CrystalReports

    .

    Engine

    .

    Table
  2. Dim

    tliCurrent As

    CrystalDecisions.

    Shared

    .

    TableLogOnInfo

  3. For

    Each

    tbCurrent In

    mReport.

    Database

    .

    Tables
  4. tliCurrent =

    tbCurrent.

    LogOnInfo
  5. With

    tliCurrent.

    ConnectionInfo
  6. .

    ServerName

    =

    Application.

    StartupPath

    &

    "\Data\Data.mdb"
  7. .

    UserID

    =

    ""
  8. .

    Password

    =

    ""
  9. .

    DatabaseName

    =

    Application.

    StartupPath

    &

    "\Data\Data.mdb"
  10. End

    With
  11. tbCurrent.

    ApplyLogOnInfo

    (

    tliCurrent)
  12. Next

    tbCurrent

Due to hectic schedule I cannot answer all questions which require too much time to debug and or modify the program.

Crystal Reports

 

452,496

328,880

328,888

Top