Crystal Report - Multiple Crosstabs with Different Record Selection Criteria

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

Answers


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.


Need Your Help

Is the programmer of a database program responsible for database backups?

sql-server database backup

Imagine you sell an application that stores its data in a Microsoft Sql Server database. Some customers are large companies with existing Sql installations and staff to maintain them. Other custome...

Variable Scope in JavaScript AddEventListner

javascript global-variables scope addeventlistener

For context, I am writing a plugin for omniture (adobe) sitecatalyst for video tracking. Before I write the plugin in the sitecatalyst format, I want to confirm it is working. I have tested the s...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.