Populate 2 textboxes from 1 parameter

  • Hello everyone.

    I have a report that has 2 text boxes.  I simply want to display the results from a drop down parameter just so the user knows what they selected.  Here are some details:

    1. Dropdown parameter (called email) that is tied to a dataset that has two fields (Name and Email Address).  The name in the parameter properties is tied to the dataset and the value field is the Name.
    2. After running the report I can select the name from the drop down which populates the 1st textbox appropriately (Text box expression is set to: Parameters!Name.Value).
    3. The problem I can't figure out is I also want this same action to populate a second text box with the email address. It seems I can only pull one value from the parameter even though the dataset itself has the email address

    Is there a way I can make the same dropdown populate 2 text boxes? ased on the two fields in the dataset after the user selects the name?

    Thanks for any provided help!

  • If the values you need are in a dataset, then you can’t use the Parameters! section to pull those in.

    In the text box you want the value to appear in from the dataset, you can simply drag the dataset column into the textbox.

    It should then be an expression similar to

    =(Fields!Column.Value, ‘DataSetName’)

  • Hello Ant,

     

    Thanks for your response.  Unfortunately adding the column in the manner you mentioned produced no results.  I need both textboxes to populate based on the selected user parameter.  The 1st box does it just fine since its tied to the parameter the user selected from the drop down (the drop down pulls from the dataset).  I want to grab the email address based on the name from the parameter the user selected.

    Thanks,

    James

  • So it sounds like something isn’t glued together somewhere.

    can you create a tablix and make it display the dataset correctly?

    is the parameter driving the dataset correctly

    can you run the query against the database using the passed in parameter value to verify there is in fact a result set?

  • Yeah, I'm sure it's probably something I'm still missing.  To your point though, I know I can do it if I pull a tablix in.  But it just seems like I should be able to select a parameter and then two text boxes acting as labels just populate based on the dropdown result.

    Parameter is driving the dataset correctly as I verified that.  One of the two textboxes does populate correctly as well based on the dropdown result (ie Parameters!Name.Value). using the   I'm just having problems populating the second textbox as it seems that I can only pull one value from a drop down.

  • So pulling in a tablix should be no different to feeding the text box with a value from the dataset.

    The only real difference is you have to specify the dataset the field comes from as the text box isn’t tired directly to a dataset like a tablix is.

    Can you screenshot what you got and post it up see if I can spot anything obvious?

  • This was removed by the editor as SPAM

  • Capture

    Sure, so notice how the selected parameter correctly populates the 1st box.  It is using this as the expression: ="Remit to: " & Parameters!owner.Value

    That dropdown is tied to a dataset that contains 2 columns (owner and email).  When I select the owner in the dropdown I want both textboxes to populate with the owner in one and the email address in the other.  All I've been successful with is just one textbox.

     

Viewing 8 posts - 1 through 7 (of 7 total)

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