how to create current Month & Year for Report

  • For a crystal report(monthly)  I want to add to the bottom of the report the current month and year each month ie.  For: August, 2005.

    Can anyone tell me the formula?   thanks in advance.

     

     

  • You should be able to declare a @Variable and pass it into your recordset using the following: 

    SELECT DATENAME( month, GETDATE()) + ', ' + DATENAME( year, GETDATE()) 

    If you want different dates for various pages, you may need to do this as an additional Column within your recordset. 

    I wasn't born stupid - I had to study.

  • You can do this in the reports designer. Under the special fields section, insert the print date in the page footer. Then format the date. One of the choices is 3-99 which will give you the month-year. You can further customize by clicking Customize. Examples: 03-2005 or 03/2005, etc.

     

    Hope this helps.

    Sandi

Viewing 3 posts - 1 through 2 (of 2 total)

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