?
Solved

passing parameter from vb.net to crystal report

Posted on 2004-10-17
4
Medium Priority
?
271 Views
Last Modified: 2010-08-05
Hello All.
I am having a problem with vb.net 2003 and passing a parameter to a crystal report 9 with a parameter field.  I have the parameter defined in crystal.  I am trying to pass the parameter this way.

oRpt.SetParameterValue("?pfAssetID", "AssessmentId")

The ?pfAssestID is in my crystal report and the AssessmentId field is from my vb program.

When I run the program I get invalid field name.

I have tried so many ideas from previous posts that I don't know what to do next.

Any ideas?


BTW:  I have applied all upgrades and patches to vb.net so that it is using 9.2 version in .net
Jan
0
Comment
Question by:jgraver
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 6

Accepted Solution

by:
RaisinJ earned 375 total points
ID: 12332866
I'm sure you know the error looks to be caused by your Parameter Name...

Did you try oRpt.SetParameterValue("{?pfAssetID}", "AssessmentId")?

Try trouble shooting...  Try to pull the CR's Parameter Names out of the collection and display them so you can see how CR names them.  This may help you determine how you have to pass them in.  (The Parameter Name that is.)
0
 

Author Comment

by:jgraver
ID: 12332915
I corrected the setparametervalue and still get the same error.  How do I display the CR collection?
0
 

Author Comment

by:jgraver
ID: 12333533
I have tried everything....  I still get invalid field.  I have checked my assessmentid and it has data in it.  So I think that it must be the parameter field...
I can see the CR in the watch.  Parameter field has a ?pfAssetID in it.
If I want to use a selectionformula in VB.  Do I need anything in the CR?
Jan
0
 

Author Comment

by:jgraver
ID: 12350354
I have changed the program to use the selection function of CR Viewer and was able to make it work...
Thanks everyone
0

Featured Post

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question