Solved

passing parameter from vb.net to crystal report

Posted on 2004-10-17
4
264 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
  • 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Bind textbox to custom property in My.Settings 2 34
Round up to 100% in .NET 10 43
Get String split 5 31
Copy/Clone an object. 9 10
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now