I create a project in vb.net 2010 sql server 2008r2 and crystal report 13.
i use this code for showing the report.

Public Sub PrintSaleRInvoice()
        Dim PrintSale As New DataSet
        objsale.saleinvid = txtSaleInvid.Text
        PrintSale = objsale.PrintSaleInvoice() ' Procedure name
        PrintSale.Tables(0).TableName = "DataTable1"
        Dim rpt As New SaleInv
        rpt.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait
        rpt.PrintOptions.PaperSource = CrystalDecisions.Shared.PaperSource.Middle
        SaleRInvPrint.CrystalReportViewer1.ReportSource = rpt

    End Sub

and it is work fine
now i want to pass some value(company name, address, contact, Licence No etc.) cr er004 from global variable which is decalerd on a "global declaration" in a module.

i used for CReport dataset cr er003
create stored procedure and a function cr er005

https://ibb.co/bOjSFT ---------(cr er001)
https://ibb.co/dCJXh8 ---------(cr er003)
https://ibb.co/iNVdN8 ---------(cr er004)
https://ibb.co/kAkpUo ---------(cr er005)

i try this code but getting this error please help me this is my first project on crystal report cr er001
I try with a normal taxtbox in creport and try with a parameter field but same error

2 Weeks
Discussion Span
Last Post by rproffitt

Be aware this is an oft asked question so I won't see how it was answered before and proceed with how I might tackle this if your code fails to use a variable.

Total workaround. Since we know this can report from databases, code a short passage to put the items into a database and use that in your report.

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.