Can anyone tell me why my crystal report is not showing my data?
crystal reports
Collapse
X
-
Originally posted by dhowardCan 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
-
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 ClassComment
-
Originally posted by dhowardI'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
-
Originally posted by dhowardI 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
-
Originally posted by QVeen72Hi,
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
VeenaComment
Comment