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.
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,
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.
Comments
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
http://www.digital-metaphors.com
info@digital-metaphors.com
"Alexander Kramnik (Digital Metaphors)" wrote
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
http://www.digital-metaphors.com
info@digital-metaphors.com