EYoung
asked on
How pass parameters in VB.net 2008 using the CrystalReportViewer?
I am new to VB.net 2008 (Windows forms) but have done a lot of applications in VB6. I am writing a new vb.net 2008 application and I want to call a Crystal Reports 2008 (Vendor_Master.rpt) that I have included in my application. In VB6, the way I passed parameters was as follows:
Dim Report As dsrVendor_Master
Set Report = New dsrVendor_Master
Report.EnableParameterProm pting = False
Report.ParameterFields(1). AddCurrent Value mReport_Sort_Order_Parm
Report.ParameterFields(2). AddCurrent Value mReport_Dollars_Parm
Now in VB.net 2008 I don't know how to pass parameters to a Crystal Report using the CrystalReportViewer. Below is the code I currently am trying in the application but it errors out:
Public Class crvVendor_Master
Private Sub crvVendor_Master_Activated (ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated
CrystalReportViewer1.Param eterFieldI nfo(1).Add (mReport_S ort_Order_ Parm)
CrystalReportViewer1.Param eterFieldI nfo(2).Add (mReport_D ollars_Par m)
CrystalReportViewer1.ShowL ogo = False
CrystalReportViewer1.Zoom( 80)
End Sub
End Class
Thank you for any help.
Dim Report As dsrVendor_Master
Set Report = New dsrVendor_Master
Report.EnableParameterProm
Report.ParameterFields(1).
Report.ParameterFields(2).
Now in VB.net 2008 I don't know how to pass parameters to a Crystal Report using the CrystalReportViewer. Below is the code I currently am trying in the application but it errors out:
Public Class crvVendor_Master
Private Sub crvVendor_Master_Activated
CrystalReportViewer1.Param
CrystalReportViewer1.Param
CrystalReportViewer1.ShowL
CrystalReportViewer1.Zoom(
End Sub
End Class
Thank you for any help.
What kind of errors are you getting?
ASKER
Just a variety. Can someone provide a simple example of passing a couple of parms from the CRV in VB.net 2008 to a CR 2008 report? Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Excellent. That worked perfectly. Thank you again.
ASKER
mlmcc,
I have started a new question that I would appreciate your help with. Here is the link:
https://www.experts-exchange.com/questions/24080419/Help-with-VB-net-2008-concepts.html
Regards,
EYoung
I have started a new question that I would appreciate your help with. Here is the link:
https://www.experts-exchange.com/questions/24080419/Help-with-VB-net-2008-concepts.html
Regards,
EYoung