4

I’m using Crystal Report 2011 and I would like to know if it is possible to generate two crosstab tables with different record selection in the same report?

For example, I have the following dataset:

SchoolID      QuestionID        AnswerValue

++++++++           ++++++++++       ++++++++++++

1                    Q2             3

1                    Q2             4

3                    Q2             7

3                    Q3             5

1                    Q5             6

I would like to create two crosstabs, the first one will display questions 2 and 3 and the second crosstab will display only question 5. Can you help please with this?

Thanks

Asma

craig
  • 25,664
  • 27
  • 119
  • 205
Asma
  • 133
  • 1
  • 1
  • 6
  • Off the top of my head, couldn't you create a subreport and embed? It would still technically be one report, it would just call the other as a subreport..... – Andrew Sep 21 '12 at 19:43

1 Answers1

3

Create a formula field:

// {@question}
// dummy grouping; formula results are irrelevant
SELECT {Table.QuestionID}
CASE "Q2" OR "Q3": "A"
CASE "Q5": "B"

Create a group based on this field.

Move cross-tab to group-header section.

craig
  • 25,664
  • 27
  • 119
  • 205