Display Month wise data

  • 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...?

  • Yes, you could do this, by using the PIVOT statement. For syntax and usage of this keyword refer Books Online.

    Cheers.

  • 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.

  • You can also use the DATENAME functions in SQL Server to get the name

  • 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

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply