Ive got a basic tabular report using a dataset built from the following
query, Was wondering how do I create Grand Totals for the 'Total Revenue'and
Ã?nits Sold columns on my report, thanks
Charlie
SELECT tblProduct.Name, Count(tblProduct.Name) AS 'Units Sold',
Sum(tblProduct.VOSValue) AS 'Total Revenue',tblProduct.PCMSCode,
tblProductCategory.Name As 'Product Category'
FROM (tblProduct INNER JOIN tblCustomerProduct ON tblProduct.idProduct = tblCustomerProduct.idProduct) LEFT JOIN tblProductCategory ON
tblProduct.idProductCategory = tblProductCategory.idProductCategory
GROUP BY tblProduct.Name, tblProduct.PCMSCode, tblCustomerProduct.idProduct,
tblCustomerProduct.idProductActivity,
tblCustomerProduct.idProductRemovalReason, tblProduct.NonSaleProduct,
tblCustomerProduct.idProductDesignation, tblProductCategory.Name
HAVING (((tblCustomerProduct.idProductActivity)=1) AND
((tblCustomerProduct.idProductRemovalReason) Is Null) AND
((tblProduct.NonSaleProduct)=0) AND
((tblCustomerProduct.idProductDesignation)=1))
ORDER BY tblProduct.NameCharlie:
Just drag and drop the appropriate fields from the Fields (SSRS2000)
or Datasets pane (SSRS2005) into the table footer. SSRS will add the
SUM aggregate for you.
HTH
toolman
Charlie wrote:
> Ive got a basic tabular report using a dataset built from the following
> query, Was wondering how do I create Grand Totals for the 'Total Revenue'=and
> =DAnits Sold columns on my report, thanks
> Charlie
> SELECT tblProduct.Name, Count(tblProduct.Name) AS 'Units Sold',
> Sum(tblProduct.VOSValue) AS 'Total Revenue',tblProduct.PCMSCode,
> tblProductCategory.Name As 'Product Category'
> FROM (tblProduct INNER JOIN tblCustomerProduct ON tblProduct.idProduct ==3D
> tblCustomerProduct.idProduct) LEFT JOIN tblProductCategory ON
> tblProduct.idProductCategory =3D tblProductCategory.idProductCategory
> GROUP BY tblProduct.Name, tblProduct.PCMSCode, tblCustomerProduct.idProdu=ct,
> tblCustomerProduct.idProductActivity,
> tblCustomerProduct.idProductRemovalReason, tblProduct.NonSaleProduct,
> tblCustomerProduct.idProductDesignation, tblProductCategory.Name
> HAVING (((tblCustomerProduct.idProductActivity)=3D1) AND
> ((tblCustomerProduct.idProductRemovalReason) Is Null) AND
> ((tblProduct.NonSaleProduct)=3D0) AND
> ((tblCustomerProduct.idProductDesignation)=3D1))
> ORDER BY tblProduct.Name
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment