none
Default value for a cascading parameter

    Question

  • I have a cascading parameter, when the parameter is displayed I want to show the first entry instead of "select a vlue", how can I do this?

     

    thanks,

    Dan1104


    Dan1104
    Wednesday, December 22, 2010 3:22 PM

Answers

  • Thanks, I added the 'default value' to the cascading parameter and it's working correctly. My new issue is: I have two date parameters (from/to) as the last parameters, and they default to todays date, so when the last cascading parameter is selcted, the dates are displayed, but if I change the 'form' date and click 'preview', the report doesn't run, i have to click 'preview' at second time in order to get the report to run.

    Hi Dan,

    Since the original problem has been resolved, you can mark the replies as answers if they are helpful. For the new issue, I split it to a new thread. Generally, we will receieve more replies in this way.

    Thanks,
    Tony Chain


    Tony Chain [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Dan1104 Wednesday, December 29, 2010 1:45 PM
    Wednesday, December 29, 2010 3:09 AM

All replies

  • Hi Dan1104,

    try this,

    select "Default Values" tab under your report parameter properties --->>> select "specity values" or "get values from a query" (depending on your req.) -->> select DataSet and value field if you have "get values from a query" under "Default values" tab., thats it you are done,
    (make sure you have "Allow multiple values" is UNCHECK)

     

    Please check this link too:-
    http://blog.infotoad.com/post/2009/06/25/Working-with-Cascading-Parameters-in-Reporting-Services.aspx

     

    try my example too:-
    https://docs.google.com/leaf?id=0B9kG9JjPJGAvOTRhNjg2ZGEtOTYzNi00YjY4LWI0MzctYWFhMDdiNTYzMzE2&hl=en&authkey=CIn0-9oO

    you will need "AdventureWorksDW" db as a Shared Data Source to execute the report successfully, and I'm using BIDS 2008 R2 for this rdl file.

     

    Please let us know your feedback.


    Thanks

    Kumar


    KG, MCTS
    Wednesday, December 22, 2010 3:55 PM
  • Kumar,   Thanks, I have my 'available values' set to  use a dataset for the label and value, and i set the 'default values' to use the same ds for the value, but when i run the report, i select the paramter that this one is dependent one, but i have to click the 'view report' button to get the param to display the first entry, but then the report runs.

     

    Dan1104


    Dan1104
    Wednesday, December 22, 2010 4:10 PM
  • Hi,

    I don't understand your question in your last reply.

    Please frame the question correctly so that we can understand as much as possible to fix your issue.

    Thanks

    Kumar


    KG, MCTS
    Wednesday, December 22, 2010 4:13 PM
  • I have two parameters.  Param A and B, param B is dependent on param A, I select an option from parm A and it runs a ds to popult B, I want param B to display the first entry that comes back from the DS.  I can select option in A, but i have to click the 'view reports to get param B to display the first entry, but the report runs before I can see the other selections in param B.

     

     


    Dan1104
    Wednesday, December 22, 2010 4:20 PM
  • Hi Dan,

    As Kumar posted, in order to show the first entry in Para B after Para A was specified, we can use Default Values for Para B. However, it is unusual that the first entry is not displayed in Para B until click “View Report”. So, could you please post the dataset queries of both 2 parameters? Then I will try to assist to resolve the issue. Additionally, please also post the version of Reporting Services you are using.

    Generally, as an example of using cascading parameters, please refer to the article How to Add Cascading Parameters to a Report at:
    http://msdn.microsoft.com/en-us/library/aa337169(SQL.100).aspx

    Thanks,
    Tony Chain


    Tony Chain [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Friday, December 24, 2010 5:37 AM
  • Dan,

     

    When you select your first parameter, in some cases, it takes time to populate second parameter.

    You wait for some moment then check.

     

    Regarding, automatic selection of first entry rather than "select a value"

    As Tony and Kumar suggested, you can use Default Value.

     

    hope it helps!

    Regards

    Manoj

    Friday, December 24, 2010 11:45 AM
  • Thanks, I added the 'default value' to the cascading parameter and it's working correctly. My new issue is: I have two date parameters (from/to) as the last parameters, and they default to todays date, so when the last cascading parameter is selcted, the dates are displayed, but if I change the 'form' date and click 'preview', the report doesn't run, i have to click 'preview' at second time in order to get the report to run.

    Hi Dan,

    Since the original problem has been resolved, you can mark the replies as answers if they are helpful. For the new issue, I split it to a new thread. Generally, we will receieve more replies in this way.

    Thanks,
    Tony Chain


    Tony Chain [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    • Marked as answer by Dan1104 Wednesday, December 29, 2010 1:45 PM
    Wednesday, December 29, 2010 3:09 AM