Question

I'm trying to built a report in SSRS where I can display all the skus available to one product in different store. enter image description here

The only problem is when I do so, it generate a new row for the same product for a sku located in another store. enter image description here

I would like to regroup them on the same row.

Any idea??

No correct solution

OTHER TIPS

You'll need to add a row group to group by whatever other fields you need in the group, and then for your merged SKU field you can do something like:

=JOIN(LOOKUPSET(Fields!CandidateField.Value, Fields!CandidateField.Value, Fields!SKU.Value, 'DataSet1"), ",")

Replace "CandidateField" with the name of a field that can be "joined" back to itself (this is done by the LOOKUPSET() function) to produce the collection of SKUs you need for each row group. Also replace "DataSet1" with the name of your dataset.

And you can replace the comma with whatever delimiter you want.

The JOIN function is what is concatenating the values together; LOOKUPSET() is providing an input array to it.

Note that this only works in SSRS 2008 R2 or newer.

EDIT: Note that this is one means of doing this via SSRS; you could also handle this in your SQL if you'd prefer.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top