Print Page | Close Window

Crosstab column comparison

Printed From: Crystal Reports Book
Category: Crystal Reports for Visual Studio 2005 and Newer
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=22381
Printed Date: 26 Apr 2024 at 6:55am


Topic: Crosstab column comparison
Posted By: Infoscrin
Subject: Crosstab column comparison
Date Posted: 06 Jul 2017 at 4:13am
Dear all!

I am new to Crystal Reports as a collegue of mine left the company and I got to do the whole reporting with Crystal Reports 2013.

What the reports should show is the following:

Our sales wants to compare the costumer per month from two different years, to see:
  • e.g. if costumers bought something in Mai 2016 and not in Mai 2017(lost costumers) or
  • if costumers bought something in Mai 2017 and not in Mai 2016(new costumers)

I tried to achieve this with a crosstab, but i always get a mixture of both, lost and new costumers...

I've created a filter for the years and months, added the month to the groupheader and added the year to the columns of the crosstab afterwards.
The row consists of the costumer name and the employee that was in charge. As a group result i added the sum of the money.

I don't know if this is enough information for you... If you need anything, please ask :/

Thank you very much in advance for your help!



Replies:
Posted By: hilfy
Date Posted: 10 Aug 2017 at 7:07am
How are your SQL skills? I would do this using a "Command", which is a SQL Select statement. For information about how to use commands correctly, see this blog post: https://blogs.sap.com/2015/04/01/best-practices-when-using-commands-with-crystal-reports/.

If you would like help building the query for this, I'll need a couple of things:

1. Info about what type of database you're using (SQL syntax varies based on the type of database).

2. The query that Crystal has built for the report (go to the Database Menu, select "Show Query", copy the query and paste it in your response.)

3. The selection formula from the Select Expert in your report.

-Dell

-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window