Hello,
I want to design a master-detail report with the main select from the query below as the master and the subselect as the detail. I set up the report data source to use the subselect query and I have to do the outer grouping on the report level. However, I can't figure out how to achieve this behavior in Telerik Reporting, since it doesn't allow aggregate functions in the group by clause and I need to group by SUM(Amount). Is it possible to use alias, as I do in the T-SQL query?
SELECT sub1.ID, SUM(sub1.Value) AS Value, sub1.Amount
FROM
(SELECT ForeignID AS ID, Value, SUM(Amount) AS Amount
FROM Tbl
GROUP BY ForeignID, Value) sub1
GROUP BY sub1.ID, sub1.Amount
I want to design a master-detail report with the main select from the query below as the master and the subselect as the detail. I set up the report data source to use the subselect query and I have to do the outer grouping on the report level. However, I can't figure out how to achieve this behavior in Telerik Reporting, since it doesn't allow aggregate functions in the group by clause and I need to group by SUM(Amount). Is it possible to use alias, as I do in the T-SQL query?
SELECT sub1.ID, SUM(sub1.Value) AS Value, sub1.Amount
FROM
(SELECT ForeignID AS ID, Value, SUM(Amount) AS Amount
FROM Tbl
GROUP BY ForeignID, Value) sub1
GROUP BY sub1.ID, sub1.Amount