Results 1 to 3 of 3

Thread: Problem Loading Report

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2009
    Posts
    16

    Problem Loading Report

    Im having trouble when my crystal report loads the record to the reportviewer....the situation is when there's already a record on the database when i create a blank report and i view the record using my reportviewer in runtime i can see the records correctly but when i try to add/delete or edit some records the records that i can view were the records that i already created before i create a blank report....
    this is the code that i have for loading the .mdb file(ms access database)
    Code:
    Imports CrystalDecisions.CrystalReports.Engine
    Public Class Form2
        Private Sub Form2_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            Dim cryRpt As New ReportDocument
    
            cryRpt.Load("C:\Documents and Settings\Buen\Desktop\WindowsApplication3\WindowsApplication3\CrystalReport1.rpt")
            CrystalReportViewer1.ReportSource = cryRpt
    
        End Sub
    End Class
    im using a build-in crystal report for microsoft visual studio 2008.....
    hope you can understand my english ....thank you....

  2. #2
    Addicted Member
    Join Date
    Sep 2006
    Posts
    236

    Re: Problem Loading Report

    Try adding this line of code under the report source ...

    Code:
    cryRpt.DiscardSavedData
    Forces CR to read fresh data.

    Ken

  3. #3
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Problem Loading Report

    Code:
    cryRpt.DiscardSavedData
    I'm afraid it doesn't work for .net

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