Click here to Skip to main content
15,897,718 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm learning to use crystal report in my project. When I move my project folder to another folder the report can't load the "new data" inserted into database. My original project folder is D:\Learning\ and when I copied to D:\Deploy\Learning\ the report can't load the new data. Please, help me how to solve my problem. Here is the code.

VB
Private Sub CrystalReport_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        Dim rpt As New ReportDocument
        rpt.Load(Application.StartupPath & "\CrystalReport1.rpt")
        Me.CrystalReportViewer1.ReportSource = rpt
        Me.CrystalReportViewer1.Refresh()
    End Sub
Posted
Comments
thatraja 17-Jul-11 3:07am    
Are you getting any error messages? check your error log & tell me.

1 solution

Is your database also kept in your project? If so...you may have to go the crystal report, right click on Database Fields in the Field Explorer, select Set Database location and find the database the new location.

You might find more help in some of the CP Articles[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900