Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Custom Group

edited April 2002 in General
I'm trying to create a group on the month and year of a date. So instead of
seeing everything for every date in a month, I need to see one entry per a
month in a year.

Comments

  • edited April 2002
    You have two options. The first and easiest way is to perform the
    appropriate calculations in SQL by extracting the year and month from the
    date field and doing an aggregate calculation(s) for the entire month in the
    SELECT statement. The other options is to create what's known as a
    suppressed detail report. For that you would still select every record for
    the month. You would then create a group on the year and on the month of the
    detail. Set the height of the detail band to 0 and use the month group
    footer as the 'new detail' band. Take a look at Demo 111 in Crosstabs demo
    found in RBuilder/Demos/Crosstabs for an example of extracting the year from
    a date in a calculated field of a data view.
    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

  • edited April 2002
    Do I use the group by custom field to create a group on year and month?

    "Alexander Kramnik (Digital Metaphors)" wrote
  • edited April 2002
    If the year and month are calculated SQL fields you would set the Break on
    to Data Field. If you are calculating those values in Delphi code you would
    then set break on a custom field, such as a variable, which you would set to
    the year or month value.

    --
    Cheers,

    Alexander Kramnik
    Digital Metaphors

This discussion has been closed.