レポートの DataSet として以下を使用し、レポート レイアウトでマトリックスを使用することで、これを解決したことは間違いありません。
基本的に、shahkalpesh が上で言ったことを実行しました...「レポートを表示するために使用されるクエリは、このフィールドを計算列として持つことができます。」
select
'Avg' as LocationID,
'Avg' as Description,
AccountDesc,
@PayrollYear as Year,
@PayrollMonth as Month,
avg(s.TotalHrs) as TotalHrs,
avg(s.Amount) as Amount from
(
select LocationID, 'Avg' as Description, AccountDesc,
@PayrollYear as Year, @PayrollMonth as Month,
sum(TotalHrs) as TotalHrs,
sum(Amount) as Amount from vwPayroll
where LocationID in (select value from dbo.ParmsToList(@PayrollLocIds))
and Year = @PayrollYear and Month = @PayrollMonth
group by LocationID, AccountDesc, Year, Month
) as s
group by AccountDesc
union all
select
LocationID,
Description,
AccountDesc,
Year,
Month,
Sum(TotalHrs) as TotalHrs,
Sum(Amount) as Amount
from vwPayroll
where LocationID in (select value from dbo.ParmsToList(@PayrollLocIds))
and Year = @PayrollYear and Month = @PayrollMonth
group by LocationID, Description, AccountDesc, Year, Month