4 Replies - 460 Views - Last Post: 05 July 2013 - 08:42 AM Rate Topic: -----

#1 786_student  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 29-June 13

Crystal Report not taking values

Posted 04 July 2013 - 10:25 AM

Hi!

We have made a crystal report but it is not showing the updated values when we run the code in the browser although when we go to this : 'Browse Field Data' for any field, it shows the updated content there.

Below is our code.
Imports CrystalDecisions.CrystalReports.Engine
Public Class WebForm11
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim cryRpt As New ReportDocument
        cryRpt.Load(Server.MapPath("CrystalReport11.rpt"))
        CrystalReportViewer1.ReportSource = cryRpt
    End Sub

End Class



Is This A Good Question/Topic? 0
  • +

Replies To: Crystal Report not taking values

#2 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 1057
  • View blog
  • Posts: 4,092
  • Joined: 02-July 08

Re: Crystal Report not taking values

Posted 04 July 2013 - 07:34 PM

Typically the path for the server is like this for the root directory. Maybe this is the problem. Did you check cryRpt variable after the Load method?

Imports CrystalDecisions.CrystalReports.Engine
Public Class WebForm11
    Inherits System.Web.UI.Page
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Dim cryRpt As New ReportDocument
        cryRpt.Load(Server.MapPath("~/CrystalReport11.rpt"))
        CrystalReportViewer1.ReportSource = cryRpt ' check this variable during debug
    End Sub
End Class


Was This Post Helpful? 0
  • +
  • -

#3 786_student  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 29-June 13

Re: Crystal Report not taking values

Posted 05 July 2013 - 07:17 AM

Hi!

We tried that but it did not work..
Was This Post Helpful? 0
  • +
  • -

#4 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 1057
  • View blog
  • Posts: 4,092
  • Joined: 02-July 08

Re: Crystal Report not taking values

Posted 05 July 2013 - 08:36 AM

Great, but not working is a bit vague for anyone to help. Are you getting any errors? Did you check if the path is correct?

Dim path As String = Server.MapPath("~/CrystalReport11.rpt")
If IO.File.Exists(path) Then
  'continue with code for working path
End If

Was This Post Helpful? 0
  • +
  • -

#5 786_student  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 20
  • Joined: 29-June 13

Re: Crystal Report not taking values

Posted 05 July 2013 - 08:42 AM

Hi!

We checked that the path is correct and there are no errors also.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1