veljasije
veljasije

Reputation: 7092

Report with combined fields

I need to create report to render like image below:

enter image description here

So, for each question, I have several answers (4 or 5 answers), and every question have belonging image.

DATASET:

QuestionId  QuestionName    Image   AnswerId    AnswerText

1           Question 1      Image   1           Answer 11
1           Question 1      Image   1           Answer 12
1           Question 1      Image   1           Answer 13
1           Question 2      Image   1           Answer 21
1           Question 2      Image   1           Answer 22
1           Question 2      Image   1           Answer 23
1           Question 3      Image   1           Answer 31
1           Question 3      Image   1           Answer 32
1           Question 3      Image   1           Answer 33

Upvotes: 0

Views: 26

Answers (1)

Jonnus
Jonnus

Reputation: 3038

To do this I have made the following assumption

  • You want each Question Text to appear as a new question with it's own associated answers

I would implement this using a List in SSRS

  1. Add a new List item, and set it's DataSetName to your Dataset. (I have also set the BorderStyle to Solid in the example below)

  2. Right click the Row Header, and select Row Group -> Group Properties, then Group on QuestionName

enter image description here

  1. Within the body of the list item, draw a textbox for the Question name, and Create a Placeholder in it with the value =Fields!QuestionName.Value

  2. Add a new image box, and set it to use the image =Fields!Image.Value

  3. Finally add a new table, and set the data to be =Fields!AnswerText.Value. (You may also want to remove the header row)

The final layout should be something like this

enter image description here

And when run will render as

enter image description here

Hopefully this is the sort of thing you are after. If not then let us know to provide further assistance.

Upvotes: 1

Related Questions