Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date in a Report Header (A2K SR2)

    I've created a report based on a parameter query. The parameter retrieves the reporting period end month and year and the query returns all records with dates less than or equal to that date and year. I don't know, however, how to place that reporting period end month and year in the Report Header. That information isn't returned in the query and I just can't figure out how to get it into the header. Can I somehow 'extract' the month and year from the most recent date returned by the query? Thanks for the help.

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Date in a Report Header (A2K SR2)

    A simple way is to create expressions in your query that return the parameter values. Then you can just grab those from the fields list for your report and insert them into the header.
    Charlotte

  3. #3
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date in a Report Header (A2K SR2)

    Charlotte,

    Forgive my ignorance, but can you provide additional detail? The query now returns 'X' number of records, each with a date equal to or less than the parameter value. Where would I create the expression?

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Date in a Report Header (A2K SR2)

    You know how to create a calculated expression in a query, right? Then just add a column to the query grid, give it a descriptive expression name like "DateParam:", and add the parameter you used in the criteria line. For expample, your expression might look like this:

    DateParam: [Enter the start date]

    You'll need to enter the parameter *exactly* as it is in the criteria to avoid having it pop up twice when you run the report.
    Charlotte

  5. #5
    3 Star Lounger
    Join Date
    Mar 2001
    Location
    Frederick, Maryland, USA
    Posts
    296
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date in a Report Header (A2K SR2)

    Thanks, Charlotte. Your solution took care of it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •