0

I have a table with one parent group row and a detailed row as shown in below screenshot.
enter image description here

i got a requirement that the values come in detail row should be concatinated and show up in single row when exported to excel as shown in below screenshot.
enter image description here

Please suggest a solution.

hemanth
  • 577
  • 6
  • 17

3 Answers3

1

Try using a lookupset and joining the results, as your detail expression:

=Join(LookupSet(DataSet!GroupID.Value, DataSet!GroupID.Value, DataSet!Sno.Value, "Dataset"),",")
Joao Leal
  • 5,533
  • 1
  • 13
  • 23
1

Sorry, I misunderstood your question.

You can achieve your requirement by using Lookupset method using expression like =Join(LookupSet(Fields!State_ID.Value, Fields!State_ID.Value,Fields!city.Value,"DataSet2"),VBCRLF).

Take a look into this post http://www.bi-rootdata.com/2012/10/lookup-function-in-ssrs.html that has a sample report for download with lookup function details.

Aftab Ansari
  • 926
  • 9
  • 17
0

If I have understand your problem correctly that says you want a tabular look in report preview but the moment you will export it into excel the columns (SNO, name) will be appear in one line row. If this is the case, you can give a try to below steps but SSRS R2 version would be required:

  1. Place a table on report and design as you want to show in report preview
  2. Now for your excel export part, place a matrix and do the row groping on Group1 column and column grouping on SNO & Name columns
  3. Now place a Matrix visibility expression that says =IIF(Globals!RenderFormat.Name="EXCEL",FALSE,TRUE) . you can take a look into http://www.bi-rootdata.com/2012/10/efficient-way-of-handling-excel.html for more details regarding RenderFormat.

Let me know if any query.

Aftab Ansari
  • 926
  • 9
  • 17
  • Sorry don't want to merge columns Sno and Name.As shown in 1st screenshot, it is my actual table.. in which i will get output when exported to excel like total 7 rows, in which group1 (1) has 3 rows and group1(2) has 4 rows but actually what i need is to display only 2 rows group1(1) and group1(2) with group1(1)'s three values(A,B,C) to single row and group1(2)'s four values(D,C,E,F)... Am I clear?? – hemanth Nov 27 '12 at 13:47