SQL Server Performance

Pass Parameter

Discussion in 'SQL Server Reporting Services' started by liorlankri, Aug 17, 2005.

  1. liorlankri New Member



    I have a web site which contain a link to a SQL Report. Is it any way to pass parameter (in the address "Http://Sqlservername/repotrts/..." tho the Report???

    If yes, How to do this?
  2. ruipedro.sousa New Member

  3. ruipedro.sousa New Member

    oops.

    it seems the url i have just made up is a real one... Don't clik it.



    Rui Sousa,
    Portugal
  4. liorlankri New Member

    But how can I read the parameters in the report???
  5. ruipedro.sousa New Member

    I don't know if i understood your question, I guess you want to show in the report the parameter value passed on the URL.

    To do that in a textbox, and continuing with the example I posted, you should put an expression like the following in the textbox value: =Parameters!CustomerID.Value

    Or something like this:

    ="This is the report for customer " + Parameters!CustomerID.Value

    Hope this helps

    Rui Sousa,
    Portugal
  6. liorlankri New Member

    So. as I understand I need to define the parameter on my report (Report-> Report Parameters ->Add)
    But without Prompt
    Am I right??
  7. ruipedro.sousa New Member


    Yes, you have to define the parameter on your report, but it can have a prompt.




    Rui Sousa,
    Portugal
  8. liorlankri New Member

    I did it but it's not work!

    I defined in my report a parameter caled testP (No prompt) with default value "aaa".
    The report contain a TextBox which it's value is the testP parameter value.
    When I open the report on the SQL report:

    http://SQLreportserver/Reports/Pages/Report.aspx?ItemPath=/TestReports/My_Test

    It's print to me "aaa" on that textbox. When I send value on the link:

    http://SQLreportserver/Reports/Pages/Report.aspx?ItemPath=/TestReports/My_Test&testP=bbb

    It's still print to me "aaa" and not "bbb"

    What's wrong????
  9. ruipedro.sousa New Member

    Depeding on you caching options a refresh, on the Reporting Services toolbar, may help.

    If not... I don't know, sorry.

    Rui Sousa,
    Portugal
  10. Akthar New Member

    Hi,
    try modifiing the paramater in the report view in your browser and refresh, just to test if your report parameter is working!!!!!![?]

    AKTHAR DILMOHAMUD
    65 BENARES ST
    PORT LOUIS
    MAURITIUS
  11. liorlankri New Member

    still not work!

    What can I do?


  12. liorlankri New Member

    any help......? pleas
  13. liorlankri New Member

    Please Help
  14. Madhivanan Moderator

    How are you calling the reports?
    If you use Front End Application to call it then pass parameter value from there
    In Crystal Reports, you can do from VB as follows
    CR.Parameters(0)="Parameter value"
    See if you are able to do the same in SSRS also

    Madhivanan

    Failing to plan is Planning to fail

Share This Page