SQL Server Performance

Using Parameter Field in page Header of a Report

Discussion in 'SQL Server Reporting Services' started by zeke, Sep 28, 2005.

  1. zeke New Member

    I have created a SQL report that uses 2 parameter fields:

    1. StartDate (in the form of MM-DD-YYYY e.g. 03-01-2005 for March 1, 2005)

    2. EndDate (in the form of MM-DD-YYYY e.g. 09-27-2005 for September 27, 2005)

    In my report I have a logo in the page header with the following text placed beside the logo:

    [Logo]Examination Branch Exam Status Report
    In the period of: [Start Date] "to" [End Date]

    The parameter fields display next to the logo as 03-01-2005 to 09-27-2005

    How do I get these parameter fields to display like this:

    [Logo]Examination Branch Exam Status Report
    In the period of: March 1, 2005 to September 27, 2005


    I know that you can do this with Crystal Report parameter fields but I am a bit new to SSRS.


    Thanks again for any help on this.

    John Falloon
  2. tikus New Member

    if you parameters are pStartDate and pEndDate, add the following code to your textbox:

    = "In the Period of: " & CDate(Parameters!pStartDate.Value).ToString("MMMM dd, yyyy") & " to " & CDate(Parameters!pEndDate.Value).ToString("MMMM dd, yyyy")
  3. zeke New Member

    Thanks for this code snippet - this resolved the problem!



    quote:Originally posted by tikus

    if you parameters are pStartDate and pEndDate, add the following code to your textbox:

    = "In the Period of: " & CDate(Parameters!pStartDate.Value).ToString("MMMM dd, yyyy") & " to " & CDate(Parameters!pEndDate.Value).ToString("MMMM dd, yyyy")

Share This Page