Hidden Parameter value doesnt work the way I want it to?

  • Hi,

    I have report 4 parameters and where the 4th parameter is a hidden parameter.

    the parameters are

    @Str_dt

    @end_dt

    @Referral

    @urgent -- Hidden.

    the hidden parameter should be populated based on Label of the @Referral value

    SO for my @referral parameter i have a query which gives me the Id and the label.

    and i am setting the hidden parameter default as

    =Parameters!referral.LabelSo the first time when i run the report it works fine for the parameters '1/1/2009','1/15/2009',Emergent, Emergent.. and sometime later i go in and select a different referral value like Routine the Hidden Parameter still says emergent..

    since i have specified

    =Parameters!referral.Labeldoes'nt the hidden value have to change based on the Parameter of referral.

    Any help will be appreciated.

    thanks,

    Karen

  • Let me see if I am following so far:

    You open the report and there are the selections for the parameters. @urgent is the only one dependent on another parameter. You choose your parameters and click 'View Report'. @urgent is set correctly, report runs fine. Then you select a different @Referral and click 'View Report' but the @urgent parameter doesn't change. Is this scenario correct?

  • yes that is correct....

  • I missed your reply Friday. I did some searching and I came across a post stating that the parameter will update only if it is based on a query. So what I was hoping is that you could try setting the default for it up as a query. Perhaps creating a table that has all the labels that are in the first parameter and using the current selection as part of the where clause. Let me know what your results are.

  • Wesley Norton (5/11/2009)the parameter will update only if it is based on a query. So what I was hoping is that you could try setting the default for it up as a query.

    Yes, what Wesley suggests is probably the way to go. The trick is to set up the value for @urgent as a query. Here's what I did, and it seemed to work:

    1. Create a new dataset called dsUrgent, which will be the source for @urgent. The query is: ="SELECT 'urgent' AS urgent". It's a dummy query, and there might be a better approach, but you have to have some text which returns a value when executed.

    2. Click the Edit Selected Dataset button next to the dataset name, go to the Fields tab, and enter a new field - name: "urgent", type: Calculated Field, value: =Parameters!Referral.Label

    3. Back to the report's Layout view, in the Report Parameters, for the urgent hidden parameter, set the Available Values to "From Query" and use Dataset: dsUrgent, Value Field: urgent, Label Field: urgent. Set the Default Values to "From Query" and use Dataset: dsUrgent, Value Field: urgent

    4. The @urgent parameter is now assigned a value behind the scenes, every time you change the selection of @Referral.

    HTH

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

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