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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass Parameter using VB6 to CRv9

Status
Not open for further replies.

RRAnthon

Programmer
Sep 25, 2005
24
US
Forgive me if I'm flogging a dead horse, but everywhere I've searched I find the .Net solution and not VB6. Using VB6 and CR9, using a stored procedure. When I select the SP in my report, it automatically creates a parameter which means I get the parameter prompt at run time. How do I programmatically pass the parameter using VB6 to the report at runtime so the report will run w/out prompting the user? Thank you!
 
Something like this:

crxRpt.ParameterFields.GetItemByName("@ParamName").AddCurrentValue strValue

-dave
 
K - been way too busy with the 9 to 5, plus trying to get a handmade soap biz off the ground. I popped in today to poke around one of the SQL forums, and thought I'd drop in around these parts as well.

-dave
 
Thanks for the help guys, that line of code does work, however, I found that I can still pass the parameter via the stored procedure when I use the following code after setting mrsDataSet as an ADOR.Recordset.

crReport.Database.SetDataSource mrsDataSet

I stumbled upon this fix Sunday afternoon. Thanks again for the help and the link!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top