Format of parameters in Stored Procedure

  • I am new to Reporting Services and have written a report that uses a stored procedure with 3 parameters.  The connection os ODBC and the database is Informix.  If I hardcode the values of the parameters into the execute procedure line, the report runs but I am unable to determine how to pass the values of my report parameters into the procedure.  These are examples of things I have tried:

    execute procedure t1(2007,125,125)   - this works

    the following get an ODBC syntax error: (fiscalyr,beg_site,end_site are my parameter names)

    execute procedure t1(fiscalyr,beg_site,end_site)

    execure procedure t1(Parameters!fiscalyr.Value,Parameters!beg_site.Value,Parameters!end_site.Value)

    What am I missing?   

  • Take a look at this solution it might be helpful.

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=306601&SiteID=1

  • Thanks for your response.

    The post you referred me to is regarding multiple values on a single parameter that is not using a stored procedure.  I have 3 different parameters.  I am able to get the values directly into the sql statement but I need to use a stored procedure so the format on the execute procedure line is my problem.

    However, I have seen a lot of talk about how to run multiple values on a single parameter and I am sure this info will be valuable later.

    Thanks Again.

  • Use..

    execute procedure t1 @fiscalyr, @beg_site, @end_site

    and make sure that your parameter names in the report are named fiscalyr, beg_site and end_site.

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • You cannot use named parameters with Informix/ODBC.  They must be unnamed parameters (question marks)...at least it did not work for me and what I have read says you can't use named parameters.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply