Static Report Parameter Question

  • SQL STEWIE

    SSCommitted

    Points: 1837

    I have a report with a parameterized query. I want to set that parameter to be a static value (ex. "TableA"). I am having a difficult time in SSRS getting that to work.

    I tried a bunch of different things, and most of them either return 0 rows or error when I attempt to preview the report. Does anyone have any ideas on how to accomplish what I am looking for?

    Thanks!

    Michael

  • Jack Corbett

    SSC Guru

    Points: 184381

    Create a hidden report parameter that has a default value and use that to populate the query parameter.

    Jack Corbett
    Consultant - Straight Path Solutions
    Check out these links on how to get faster and more accurate answers:
    Forum Etiquette: How to post data/code on a forum to get the best help
    Need an Answer? Actually, No ... You Need a Question

  • SQL STEWIE

    SSCommitted

    Points: 1837

    Thanks...I tried that and got

    "The report parameter 'ObjectName' has a DefaultValue or ValidValue that depends on Report paramter 'ReportParameter1'. Forward dependencies are not valid"

    I apologize, but this is my first stab at using SSRS, so I will probably need some step by step instructions 🙂

    Thanks!

    Michael

  • ricky.chauvin

    SSC Enthusiast

    Points: 132

    I think this may be because you are trying to base your report on a value that does not exist until it has generated. A way round these kind of things is to leave the parameter out and then set up another report which needs it. Then when a user click on a "button" (read: pretty textbox) set the value there.

    Does that make sense?

  • Jason Selburg

    SSC-Insane

    Points: 24637

    Actually, it's less complicated than that. One (or more) of your parameters "depend" on the user's selection of another parameter. Simply move any paramter the relies on another parameter lower in the list of paramters. i.e. Have them appear in order.

    ______________________________________________________________________

    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

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

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