Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Blank Crystal Report

Status
Not open for further replies.

jbehrne

Programmer
Dec 18, 2002
484
US
Hi all,

I have a report (created in CR 8.5 - connecting via ADO.Net) that runs off of a stored procedure. The stored procedure has two parameters that filter that returned data (both the fields are strings). When I run the report the report prints but no data is displayed (but if I run the same stored procedure and dump the data to a datagrid values are returned). Does anyone have any idea about what is going wrong? Does anyone have a walkthrough for creating the report? Thanks,

jbehrne

Here is the code to print the report:
Code:
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared

Dim cr As New CrystalDecisions.CrystalReports.Engine.ReportDocument
        cr.Load(ReportLoc & "\PBHistoricalByEntry.rpt")
        Dim pvEntry As New CrystalDecisions.Shared.ParameterValues
        Dim pdvEntry As New CrystalDecisions.Shared.ParameterDiscreteValue
        pdvEntry.Value = Me.cmbEntry.Text
        pvEntry.Add(pdvEntry)
        cr.DataDefinition.ParameterFields("@SelectedEntry").ApplyCurrentValues(pvEntry)

        Dim pvAcct As New CrystalDecisions.Shared.ParameterValues
        Dim pdvAcct As New CrystalDecisions.Shared.ParameterDiscreteValue
        pdvAcct.Value = Me.txtAcct.Text
        pvAcct.Add(pdvAcct)
        cr.DataDefinition.ParameterFields("@SelectedAcctNum").ApplyCurrentValues(pvAcct)

        cr.PrintToPrinter(1, True, 1, 0)

Here is the stored procedure:
Code:
SELECT     AccountDescription, AccountCode, JobName, Total, Pieces, DocumentNumber, EntryNumber, StatementDate
FROM         dbo.tblPBHistory
WHERE     (EntryNumber = @SelectedEntry) AND (AccountCode = @SelectedAcctNum)



If at first you don't succeed, call in an airstrike. - Murphy's Laws of Combat Operations
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top