Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CR10 Oracle9 vb6 : parameter doesn't work 1

Status
Not open for further replies.

Lemox

Programmer
Dec 13, 2003
67
GB
Hi,
I'm trying to pass a parameter from vb to CR10 :

------
MyRep.ParameterFields.GetItemByName("MyParam").SetCurrentValue(Cstr(100))
------

(MyParam is declared as string parameter)

I display the value of MyParam in the report : it's always set to 0 !!!
Actually it's always set to the value that the Database Expert asks me when I create the parameter at first time (design time)...

What's wrong with this ?

Thanks
Lemox
 
Make sure the report isn't using saved data by calling the DiscardSavedData method before setting the parameter (MyRep.DiscardSavedData).

If that doesn't help, try commenting out the line of code where you're setting the parameter - that should allow the default CR 'Enter Parameter Values' dialog to display. Does it set the parameter correctly this way?

-dave
 
Dave,
'.DiscardSavedData' worked like a charm !
I spent so much time on this one !

Thanks a lot !!!
Lemox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top