I have read through most of the post in this forum (.NET Development - Crystal Reports), but I just donu2019t seem to be finding what I need, although I did learn some cool stuff, thanks.
I am using Visual Studio 2008 programming in VB. I am trying to pass a field on my form to the parameter in my CR report.
Here is the code I placed in the click event that will launch the report viewer on my main form
Private Sub btnPrintPlan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnPrintPlan.Click
Dim param1Fileds As New CrystalDecisions.Shared.ParameterFields
Dim param1Field As New CrystalDecisions.Shared.ParameterField
Dim param1Range As New CrystalDecisions.Shared.ParameterDiscreteValue
Dim CRYRpt1 As New zprCryLoanAgrmt
param1Field.ParameterFieldName = "PlanID"
param1Range.Value = tbxPlanID_inPlanInfo.Text
param1Field.CurrentValues.Add(param1Range)
param1Fileds.Add(param1Field)
param1Field.HasCurrentValue = True
CRYRpt1.CrystalReportViewer1.ParameterFieldInfo = param1Fileds
CRYRpt1.CrystalReportViewer1.ReportSource = CRYRpt1
CRYRpt1.CrystalReportViewer1.Refresh()
CRYRpt1.CrystalReportViewer1.Visible = True
My.Forms.zprCryLoanAgrmt.Show()
End Sub
It does not seem to work as the promt screen for the peramiter still pops up.
How do I pass this variable to the paramiter?
How do I make the prompt screen not appear?
Also, I will need to be able to change the database this application uses when depolyed. Again I read everything I could find, but most if it is in C#, and I code in VB.
I downloaded the samples offered on this site, but for some reason VS2008 does not want to open them???
I truly appreciale any and all help with these issues, and I thank you in advance.