question

Mohan avatar image
Mohan asked

get dataset column value as comma separated value in page header

how to get the dataset column values as a comma separated values in page header in SSRS 2008 R2
ssrs
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Pavel Pawlowski avatar image
Pavel Pawlowski answered
You can create a DataSet to get the concatenated value and than use it in the page header. The dataset can use the FOX XML query to get the column values concatenated. SELECT STUFF((SELECT ',' + YourColumn FROM YourTable FOR XML PATH('')), 1, 1, '') AS Concatenated
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Mohan avatar image Mohan commented ·
the existing query should not get disturbed, client is not accept the same. Any work around in reporting end.
0 Likes 0 ·
Pavel Pawlowski avatar image Pavel Pawlowski commented ·
Then there is a workaround using an Internal Parameter. 1. Create an Internal Parameter e.g. ConcanenateValue 2. Check the Allow Multiple Values 3. Define Default Value as "Get Value From Query" 4. Select your dataset as source 5. Select field which values should be concatenated as Value field. 6. Put Text Box to your header and set it's expression as **`=Join(Parameters!ConcanenateValue.Value, ", ")`**
0 Likes 0 ·
Mohan avatar image Mohan commented ·
client is not allowing to have an extra param? we have tried with VB code but it was not worked out.
0 Likes 0 ·
Pavel Pawlowski avatar image Pavel Pawlowski commented ·
It will be internal parameter not visible and usable in the internals of report.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.