Solved

passing parameter from vb.net to crystal report

Posted on 2004-10-17
4
269 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 125 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

726 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