Wrox Programmer Forums
|
Crystal Reports General discussion about Crystal Reports. For discussions specific to the book Professional Crystal Reports for VS.NET, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Crystal Reports section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2004, 01:23 AM
Registered User
 
Join Date: Dec 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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






Similar Threads
Thread Thread Starter Forum Replies Last Post
Parameter Problem DylCole2 Reporting Services 0 June 27th, 2007 08:42 AM
Subscription parameter problem Dangermouse BOOK: Professional SQL Server 2005 Reporting Services ISBN: 0-7645-8497-9 1 April 4th, 2007 04:56 AM
Problem with refreshing parameter roy_mm Reporting Services 0 January 25th, 2007 10:54 AM
problem with passing parameter hertendreef ADO.NET 0 June 23rd, 2006 10:00 AM
Date parameter problem SethTalbott SQL Server ASP 3 September 22nd, 2004 12:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.