Microsoft PowerPoint Reporting Tool
 

PowerPoint Report Template - Monthly Sales 4

See Microsoft ® PowerPoint ® Report

PPT Report Template - Monthly Sales 4

Function and SQL

/*********************************************************
Sales by Countries
*********************************************************/
/* Calculate the total */
@F4_1=REPORT(slide=4 type=var cell=B3)
SELECT SUM(d.Quantity)
	, Sum(d.UnitPrice * d.Quantity * (1-d.Discount))
FROM Orders o
	,OrderDetails d
	,Countries c
WHERE o.OrderID = d.OrderID
AND o.ShipCountryCode = c.CountryCode
AND YEAR(o.OrderDate) = YEAR('$ReportMonth-01')
AND MONTH(o.OrderDate) = MONTH('$ReportMonth-01')

/* Show the sales amount by countries */
@F4_2=REPORT(slide=4 type=var cell=A2)
SELECT c.CountryName
	, SUM(d.Quantity)
	, Sum(d.UnitPrice * d.Quantity * (1-d.Discount))
FROM Orders o
	,OrderDetails d
	,Countries c
WHERE o.OrderID = d.OrderID
AND o.ShipCountryCode = c.CountryCode
AND YEAR(o.OrderDate) = YEAR('$ReportMonth-01')
AND MONTH(o.OrderDate) = MONTH('$ReportMonth-01')
GROUP BY c.CountryName
ORDER BY c.CountryName

/* For chart */
@F4_3=CHART(slide=4 cell=A0)
SELECT c.CountryName
	, Sum(d.UnitPrice * d.Quantity * (1-d.Discount))
FROM Orders o
	,OrderDetails d
	,Countries c
WHERE o.OrderID = d.OrderID
AND o.ShipCountryCode = c.CountryCode
AND YEAR(o.OrderDate) = YEAR('$ReportMonth-01')
AND MONTH(o.OrderDate) = MONTH('$ReportMonth-01')
GROUP BY c.CountryName
ORDER BY c.CountryName

These sample reports are generated by PTReportGen (Report Generator for Microsoft PowerPoint). The sample reports in Microsoft PowerPoint format can be download for your report templates, and changed to adapt to your own needs. It is free.

Download the report samples in Microsoft PowerPoint format  PPT (560KB)

 


Copyright © 2006 LJZsoft Corporation. All rights reserved.