float : totalPercent dec(2),totalPriceByCountry dec(2),totalPriceByEmployee dec(2),TotalPrice dec(2),totalDetailPrice dec(2) ;
Char : formaNum1:128,formatotalEdit:128,formatotalLevel:128,formatotalpercent:128, fileCssStyle:255;
INTEGER : Totalorders,TotalEmployee,totallevelNum,Sql_totalOrderId,totalcountry,TotalordersByEmployee,TotalordersBycountry;
double : $total01 dec(2),$total02 dec(2),$total03 dec(2) ;
#include "#SYSPATHMANDRAGORE+\02-DEMO-DESKTOP-BI-EXCELandSTANDARD\99-DATABASE\VersionADO\300-00-CreateDBDemoExcel.ms4"
GetDirSysPathMANDRAGORE(LpathDataBaseExcel);
Concatene LpathDataBaseExcel,"\zInclude\css\StyleReportDesign\standardStyleReport.css" into fileCssStyle;
** Concatene LpathDataBaseExcel,"\zInclude\css\StyleReportDesign\13-style-background-image.css" into fileCssStyle;
BEGIN
DBconnect{Ms4DB}(LEnvDemoExcelDB);
Ms4_Query{ms4db} option : into $MS4DBTMP
(" SELECT a.orderID ,a.employeeid,a.LastName ,a.productID," +
" a.unitprice, a.quantity,a.CustomerID , a.productID,a.ShipName, " +
" a.ShipAddress,a.ShipCity,a.ShipRegion,a.ShipPostalCode,a.ShipCountry,strftime('%Y',orderDate) as Yearbusiness " +
" from [ms4EmplConsolidationBusiness] as a " +
" WHERE Yearbusiness in('2011') order by a.employeeID, a.shipcountry ");
Sql_DestroyEnv();
ENd ;
** *****************************************
** REPORT
** *****************************************
printlog(1);
DECLARE SCHEMA_REPORT : ReportDesign
{ INTEGER : OrderID ,EmployeeID,ProductID ,Quantity ;
TEXT : LastName , CustomerID , ShipName, ShipAddress,ShipCity,ShipRegion,ShipPostalCode,ShipCountry ,Yearbusiness;
REAL : unitprice dec(2) ;
} ;
Begin_Report
REPORTINPUT : DBconnect { Ms4DB} ($MS4DBTMP) use View ($ms4ViewDBtmp)
REPORTFORM:DESIGN
Group Order by : ReportDesign.EmployeeID ,ReportDesign.Shipcountry,ReportDesign.orderID
CssLink : fileCssStyle, CssId:"ms4report"
Start_Design :
Totalise
$total01 as ReportDesign.unitprice
$total02 as ReportDesign.Quantity
$total03 as formula("(%r*%i)",ReportDesign.unitprice,ReportDesign.Quantity)
End_Totalise
Report_Header
Print : "
";
Print : "