none
Action go to report. Pass all values of a field

    Question

  • Hello, I need to pass all values of a field to a other report.

    For example I have a table with the names of computers and the number of computers  by Server. If I click on the number of computers I need to pass those name of computers to another report.

    In my case, I have done this: action-> go to report-> Use these parameters to run the report -> Name= Name and value = Fields!Name.Value But I only get to pass one name

    In the other report I have added Name parameter with multivalue option but I can only pass one name

    How I can pass all values??

     

    Tuesday, April 08, 2014 10:27 AM

All replies

  • Hi, is it possible to give some more detail ? Like table with data...

    Sridhar

    Tuesday, April 08, 2014 11:15 AM
  • I can´t upload imges but I will try to explain.

    Server              Name

    Windows 7        357 (Action->go to report)

    Windows XP      158 (Action->go to report)

    If you click on 357 or 158 I would like to pass the names to other report.

    How I can pass 357 or 158 values of name to other report?

    Wednesday, April 09, 2014 8:00 AM
  • Hi Jack,

    According to your description, you want to pass all the value to another report when clicking one of then, right?

    In this case, you can create another parameter and get Available values and Default values from the the dataset Name field. Then when you run the report, all the Names will be filled into this parameter as a array. Then in the action property, pass the parameter to that report. In this case, all the names will be passed to that report.

    If you have any questions, please feel free to ask.

    Regards,


    Charlie Liao
    TechNet Community Support

    Wednesday, April 09, 2014 9:49 AM
  • Thanks! But I need only pass all values of a field.

    For example, If I click on the number 357 I need only pass 357 names of computers to other report.

    Do you understand me?

    Thanks again!

    Thursday, April 10, 2014 7:35 AM
  • Thanks! But I need only pass all values of a field.

    For example, If I click on the number 357 I need only pass 357 names of computers to other report.

    Do you understand me?

    Thanks again!

    So do you've another table containing those names? if yes, you can create a multi valued parameter in report (say names) and then set values based on dataset. the dataset query would be like

    SELECT NameField
    FROM NameTable
    WHERE FieldName = @NumberParam

    WHERE @NumberParam is your first parameter containing value 357 etc

    Then in second parameter properties set default and available values tab to map to created dataset field so as to pass the related name values as a csv list

    Then in code behind you need to write logic to accpet csv and do filter with it. For that you can use LIKE pattern serach or use string parsing udf etc

    http://www.sommarskog.se/arrays-in-sql-2008.html


    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    Thursday, April 10, 2014 7:48 AM
  • Could you tell me please the code of following table?

    OS Name                        Item              Name

    Windows 7                      Laptop            Computer1

                                                               Computer2

                                         Desktop          Computer 23

                                                               Computer 24

                                         Total                    4

    Windows XP                    Desktop            Computer67

                                          Tablet              Computer45

                                         Total                       2

    TOTAL                                                           6

    For example, If I click on number 4 I need to pass the names of computers (Computer1, Computer2, Computer23, Computer24) to other report to obtain detailed information of these computers.

    The same If you click on number 2.

    Thanks!


    • Edited by Jack xabi Thursday, April 10, 2014 10:16 AM
    Thursday, April 10, 2014 10:16 AM
  • Use RunningValue and customer code to concate the computer name in the group row by OS and Item field.

    Refer http://bisherryli.com/2012/08/13/ssrs-72-use-runningvalue-function-to-concatenate-row-values/


    Regards, RSingh

    • Edited by RSingh() Thursday, April 10, 2014 12:15 PM
    Thursday, April 10, 2014 12:14 PM
  • Are you using SQL querying a database, or MDX querying a cube?
    Thursday, April 10, 2014 2:00 PM
  • I have tried but it gives an error.

    Is there another way??

    Thanks!

    Monday, April 14, 2014 7:51 AM
  • I have tried but it gives an error.

    Is there another way??

    Thanks!

    Why do you need to pass Name values as a list? Isnt it better to just pass OS Name and Item values instead and filter using them to get the four computer names under them?

    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

    Monday, April 14, 2014 7:58 AM
  • Yes but hay need to pass Name values because I have other table like this:

    If I click on numbers of Item I only pass these computer Nmaes

    If I click on 4 I only pass the total Names of computers of this OS Name



    OS Name                        Item              Name

    Windows 7                      Laptop            Computer1

                                                               Computer2

                                         Total                     2

                                         Desktop          Computer 23

                                                               Computer 24

                                         Total                     2

       Total                                                       4

    Windows XP                    Desktop            Computer67

                                          Tablet              Computer45

                                        Total                      2

    TOTAL                                                       6

    How I can pass the those Names?
    • Edited by Jack xabi Monday, April 14, 2014 10:03 AM
    Monday, April 14, 2014 8:47 AM
  • Hi, all you need to do is to change the second report so that it will accept all values for the parameter.

    You need to change the SQL so all the values to be passed to do this change the query in the report to something like this 

    select * from mytable

    where name = @name

    change the query to 

    where name in (case when @name ='all' then name else @name end) 

    then in your jump to action, select  go to report and hard code the parameter value to 'all'

    HTH

    Monday, April 14, 2014 10:11 AM
  • I have tried but only pass one Name of computer

    I don´t know why

    Is there another option?

    Tuesday, April 15, 2014 7:25 AM
  • yes you still pass one name but the name will need to be 'All' and then you code that 'All' value in your SQL to return all values . . .

    where name in (case when @name ='all' then name else @name end) 

    Tuesday, April 15, 2014 10:44 AM
  • Yes but how I can put "All" in the name to pass all values?

    And the sentence "where name in (case when @name ='all' then name else @name end)" where I put it?? In the second report that go the action?

    Thanks!

    Tuesday, April 22, 2014 10:31 AM
  • Hello

    I have got this table. The names of computers of server. If we click on blue number (CountDisntinct) we go to other report.

                     

    If I execute the report we have got this:

    If I click on number 3 I need to pass the three names to other report which show more details about these Computers. If I click on 128 I need to pass 128 names of computers. How I can pass these names?

    Can you help me?

    Thanks!

    Thursday, April 24, 2014 7:35 AM