ba64b6424ef73c8d860101e5e284cceac4bdf47d
FAQ/Why-cant-I-use-Group-by-Week-on-a-datetime-for-a-subreport-action.md
| ... | ... | @@ -0,0 +1,14 @@ |
| 1 | +#Why can't I use Group by Week on a datetime for a subreport action? |
|
| 2 | + |
|
| 3 | +[[_TOC_]] |
|
| 4 | + |
|
| 5 | +##Question |
|
| 6 | + |
|
| 7 | +When I'm using a datetime grouped by week as a subreport action, I'm seeing more results than I would expect. |
|
| 8 | + |
|
| 9 | +##Answer |
|
| 10 | + |
|
| 11 | +In version 6.9.0.5, we fixed the group by week aggregate function so that it also passes year info. Previously, the week datepart was passed independently, leading to the aggregation of data by week across years. You can add the following code to your global.asax or wherever your adhocconfig is defined: |
|
| 12 | + |
|
| 13 | +IAggregateFunction groupByWeek = AdHocSettings.AggregateFunctions[StandardAggregateFunctionType.GROUP_BY_WEEK.ToString()]; |
|
| 14 | +((WeekFormatter) groupByWeek.Formatters[0]).IncludeYear = true; |
|
| ... | ... | \ No newline at end of file |