Parameter problem
Hello there
I hope you can help me with the following issue
I'm using
Microsoft Visual Basic .NET 55603-651-0000007-18076
Crystal Reports for Visual Studio .NET AAP50-GS00000-U7000RN
VS.net 2002
Frame work 1 version 1.0.3705
---------------------
the problem is i need to pass parameters to the crystal report during run time.
The only way i found so far is as following
---------------------------------
Dim rpt as new myReport
Dim param1 As New CrystalDecisions.Shared.ParameterField()
Dim param1Range As New CrystalDecisions.Shared.ParameterDiscreteValue()
Dim param1Fileds As New CrystalDecisions.Shared.ParameterFields()
param1.ParameterFieldName = "txtName"
param1Range.Value = textbox.text
param1.CurrentValues.Add(param1Range)
param1Fileds.Add(param1)
Form1.CrystalReportViewer1.ParameterFieldInfo = param1Fileds
Form1.CrystalReportViewer1.ReportSource = rpt
Form1.CrystalReportViewer1.Refresh()
Form1.CrystalReportViewer1.Visible = True
Form1.show()
---------------------------------
all the upove works fine.
the problem is I have to many parameters and doing it like that makes it is very slow and takes allot of time.
when i was checking in the forum i found that some people say you can work using The following code
------------------------
Dim strTest as string = textbox.text
rpt.SetParameterValue("txtTest", strTest)
------------------------
but i didn't find the SetParameterValue method in my report object :(. so i assume it is in newer version :(!!
I was wondering is my assumption correct or not.
and if yes is there is another way in the version i'm using that can help me pass parameters to the report.
your quick reply is highly appreciated since i have very limited time to finish the program
|