Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Display Month wise data Expand / Collapse
Author
Message
Posted Thursday, December 20, 2007 1:53 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, June 20, 2008 10:22 PM
Points: 2, Visits: 7
Hi,
I am accpting date from the user in a form.
And i want to display the data in crystal reports month wise, in which i want the month names to be the column.

Ex:

SNo Name Amount Date Jan Feb Mar Apr .....

Is there any way by which i can achive this output by sql query...?
Post #435101
Posted Thursday, December 20, 2007 2:11 AM


Right there with Babe

Right there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with BabeRight there with Babe

Group: General Forum Members
Last Login: Thursday, August 14, 2014 3:47 AM
Points: 780, Visits: 490
Yes, you could do this, by using the PIVOT statement. For syntax and usage of this keyword refer Books Online.

Cheers.
Post #435102
Posted Thursday, December 20, 2007 6:30 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Tuesday, August 10, 2010 5:07 AM
Points: 2,732, Visits: 23,078
Crystal will allow you to create a pivot report like this. Reporting Services calls it a "Matrix", but I cannot remember the Crystal term for it. It may be called a pivot report.
Post #435170
Posted Thursday, December 20, 2007 6:52 AM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 8:53 PM
Points: 33,204, Visits: 15,353
You can also use the DATENAME functions in SQL Server to get the name







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #435177
Posted Friday, December 28, 2007 2:03 PM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, February 26, 2009 3:02 PM
Points: 515, Visits: 655
I believe you are looking for "cross-tab" functionality in Crystal. I am using Crystal Reports Developer, Full version 11.0.0.1282 (I need to update to 11.5). The help file of Crystal using the Index Tab for "cross-tabs" has a good page of information an example of how data is displayed and summed up/aggregated both vertically and horizontally.

Best of Luck.


"Key"
MCITP: DBA, MCSE, MCTS: SQL 2005, OCP
Post #437230
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse