Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 Help with multiple results

Author  Topic 

OverIT
Starting Member

3 Posts

Posted - 2009-05-28 : 01:42:04
Hi,
Hopefully someone can help me. I'm new to SSRS and a tad confused.

I would like to be able to return multiple results in the one field on the report. Currently I have the following:

=IIF(Fields!inc_env_noise.value = true, "Noise", IIF(Fields!inc_env_air_emissions.Value = true, "Air", IIF(Fields!inc_land.Value = true, "Land",IIf(Fields!inc_env_surface_water.Value = true, "Surface Water", IIf(Fields!inc_ground_water.Value = true, "Ground Water", IIf(Fields!inc_resources.Value = true, "Resources", IIf(Fields!inc_other_aspects.Value = true, "[inc_other_aspects]"," ")))))))

I have tried the Switch() and Choose() functions however these only return 1 possible result.

The output I would like to see is: Noise, Land, Ground Water all in the same textbox.

All the fields are boolean with the exception of [inc_other_aspects] which is a free text field.

Does anyone know how this can be achieved, or if at all possible.
Thanks so much for taking the time to read this.

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-05-28 : 02:34:56
[code]= MID(IIF(Fields!inc_env_noise.value = true, ", Noise", "")
& IIF(Fields!inc_env_air_emissions.Value = true, ", Air", "")
& IIF(Fields!inc_land.Value = true, ", Land", "")
& IIf(Fields!inc_env_surface_water.Value = true, ", Surface Water", "")
& IIf(Fields!inc_ground_water.Value = true, ", Ground Water", "")
& IIf(Fields!inc_resources.Value = true, ", Resources", "")
& IIf(Fields!inc_other_aspects.Value = true, ", [inc_other_aspects]", "")
, 3, 200)[/code]


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-05-28 : 12:27:05
quote:
Originally posted by OverIT

Hi,
Hopefully someone can help me. I'm new to SSRS and a tad confused.

I would like to be able to return multiple results in the one field on the report. Currently I have the following:

=IIF(Fields!inc_env_noise.value = true, "Noise", IIF(Fields!inc_env_air_emissions.Value = true, "Air", IIF(Fields!inc_land.Value = true, "Land",IIf(Fields!inc_env_surface_water.Value = true, "Surface Water", IIf(Fields!inc_ground_water.Value = true, "Ground Water", IIf(Fields!inc_resources.Value = true, "Resources", IIf(Fields!inc_other_aspects.Value = true, "[inc_other_aspects]"," ")))))))

I have tried the Switch() and Choose() functions however these only return 1 possible result.

The output I would like to see is: Noise, Land, Ground Water all in the same textbox.

All the fields are boolean with the exception of [inc_other_aspects] which is a free text field.

Does anyone know how this can be achieved, or if at all possible.
Thanks so much for taking the time to read this.


i think you need to just concatenate the expressions with &
Go to Top of Page

OverIT
Starting Member

3 Posts

Posted - 2009-05-28 : 16:37:26
No, I had tried that but I did try again anyway just to make sure but it still returns #error.
Thanks for the help anyway, it is much appreciated.

Peso, with a little bit of tweaking it works perfectly, thank you!
Go to Top of Page
   

- Advertisement -