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

Problem passing a parameter with VB

Status
Not open for further replies.

Jerrycurl

Programmer
Aug 4, 1999
85
0
0
US
I'm using CR8.&nbsp;&nbsp;My report is based on a table.&nbsp;&nbsp;I have a parameter (@grant) that is used to filter the report; this is what my record selection formula looks like: {TEMP_WEEKLY_SCHEDULE.grant_name} = {?@grant}<br>The report works as expected in the Crystal Reports program.<br><br>In VB, I am trying to set that parameter programatically like this:&nbsp;&nbsp;Me.CrystalReport1.ParameterFields(0) = &quot;@grant;&quot; & Trim(Me.List(0).Text) & &quot;;TRUE&quot;<br>When I display the report after doing this, the report shows all records regardless of the grant name.&nbsp;&nbsp;If I end the parameter assignment with FALSE instead of TRUE, then I am prompted for the parameter (which is already filled in with what I want) and when I click OK, the report displays, properly filtered.&nbsp;&nbsp;Of course, I don't want the user to be prompted for this parameter.&nbsp;&nbsp;So, why would the report work with FALSE and not with TRUE?&nbsp;&nbsp;It's driving me nuts.&nbsp;&nbsp;Thanks for any help.
 
Nevermind, I modified the report to use a stored procedure as it's source and the problem went away.&nbsp;&nbsp;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top