crystal reports

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dhoward
    New Member
    • Aug 2007
    • 18

    crystal reports

    Can anyone tell me why my crystal report is not showing my data?
  • VBPhilly
    New Member
    • Aug 2007
    • 95

    #2
    Originally posted by dhoward
    Can anyone tell me why my crystal report is not showing my data?
    What version of CR?
    I only know up to 8.5.

    Comment

    • hariharanmca
      Top Contributor
      • Dec 2006
      • 1977

      #3
      Originally posted by dhoward
      Can anyone tell me why my crystal report is not showing my data?
      • Explain your problem detail.
      • Mention your CR Versions
      • Show your CR to Database connection (VB) code
      • throw what is the error you are getting

      Comment

      • dhoward
        New Member
        • Aug 2007
        • 18

        #4
        I'm using crystal reports 10 and it's not throwing an error or anything. My data is just not showing. A couple of weeks ago it was working, but recently I was trying to open my crystal report in a popup window and that's when It started giving me problems. I've tried to back track myself but I don't know if I deleted something or what. By the was I'm pulling the data from a stored procedure. Here's the code......

        Imports System.Data.Sql Client

        Public Class PD
        Inherits System.Web.UI.P age
        Protected WithEvents crystalreport1 As FireworksPermit App.CrystalRepo rt1
        Protected WithEvents CrystalReportVi ewer1 As CrystalDecision s.Web.CrystalRe portViewer

        Dim strTransactionN umber As String
        Dim DBConn As SqlConnection
        Dim MyReport As CrystalDecision s.CrystalReport s.Engine.Report Document

        #Region " Web Form Designer Generated Code "

        'This call is required by the Web Form Designer.
        <System.Diagnos tics.DebuggerSt epThrough()> Private Sub InitializeCompo nent()

        End Sub


        'NOTE: The following placeholder declaration is required by the Web Form Designer.
        'Do not delete or move it.
        Private designerPlaceho lderDeclaration As System.Object

        Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Init
        'CODEGEN: This method call is required by the Web Form Designer
        'Do not modify it using the code editor.
        InitializeCompo nent()
        End Sub

        #End Region



        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
        'Put user code to initialize the page here

        Response.Write( "<script language=javasc ript>alert(""Pl ease print application for your records!"");</script>")

        Try
        strTransactionN umber = Session("Transa ctionNumber")
        SpWithViewer(st rTransactionNum ber)
        CrystalReportVi ewer1.DataBind( )
        Catch ex As Exception

        End Try

        End Sub

        Private Sub SpWithViewer(By Val spParameter As String)
        Dim ParameterFields As CrystalDecision s.Shared.Parame terFields
        Dim ParameterField As CrystalDecision s.Shared.Parame terField
        Dim spValue As CrystalDecision s.Shared.Parame terDiscreteValu e
        ParameterFields = New CrystalDecision s.Shared.Parame terFields
        ParameterField = New CrystalDecision s.Shared.Parame terField
        ParameterField. ParameterFieldN ame = "@vchTransactio nNumber"
        spValue = New CrystalDecision s.Shared.Parame terDiscreteValu e
        spValue.Value = (spParameter)
        ParameterField. CurrentValues.A dd(spValue)
        ParameterFields .Add(ParameterF ield)
        CrystalReportVi ewer1.Parameter FieldInfo = ParameterFields
        CrystalReportVi ewer1.ReportSou rce = crystalreport1
        End Sub


        End Class

        Comment

        • hariharanmca
          Top Contributor
          • Dec 2006
          • 1977

          #5
          Originally posted by dhoward
          I'm using crystal reports 10 and it's not throwing an error or anything. My data is just not showing. A couple of weeks ago it was working, but recently I was trying to open my crystal report in a popup window and that's when It started giving me problems. I've tried to back track myself but I don't know if I deleted something or what. By the was I'm pulling the data from a stored procedure. Here's the code......
          • Code is in VB.NET
          • Did you check with parameter fields?
          • Is data available to that parameter value?
          • Dim DBConn As SqlConnection is not in use
          • Check the Database connection (i think it's not here!)


          If this is not throwing any error then; the problem is with the parameter value.

          Comment

          • dhoward
            New Member
            • Aug 2007
            • 18

            #6
            I checked the parameter fields. There is data in the fields. The connection is correct. the stored procedure works fine. Is there something else I'm suppose to add after declaring the sqlconnection?

            Comment

            • hariharanmca
              Top Contributor
              • Dec 2006
              • 1977

              #7
              Originally posted by dhoward
              I checked the parameter fields. There is data in the fields. The connection is correct. the stored procedure works fine. Is there something else I'm suppose to add after declaring the sqlconnection?

              Can you explain where you are connection CR to Database?

              Comment

              • QVeen72
                Recognized Expert Top Contributor
                • Oct 2006
                • 1445

                #8
                Hi,

                What is ur Back end database, u will have to Set Log on Info/ UserName/Password, for all the Tables, used in the report..

                REgards
                Veena

                Comment

                • hariharanmca
                  Top Contributor
                  • Dec 2006
                  • 1977

                  #9
                  Originally posted by QVeen72
                  Hi,

                  What is ur Back end database, u will have to Set Log on Info/ UserName/Password, for all the Tables, used in the report..

                  REgards
                  Veena
                  My gasses, that is Sql Server!

                  Comment

                  • QVeen72
                    Recognized Expert Top Contributor
                    • Oct 2006
                    • 1445

                    #10
                    Hi,

                    and u have to Import these Classes :

                    [code=vb]
                    Imports CrystalDecision s.Shared
                    Imports CrystalDecision s.CrystalReport s.Engine
                    [/code]

                    REgards
                    Veena

                    Comment

                    Working...