** ****************************************************************************************** *
** (ms4 script) - MS4 BI PROFESSIONAL for WINDOWS & WEB-
** *******************************************************************************************
float : totalPercent dec(2),totalPriceByCountry dec(2),totalPriceByEmployee dec(2),TotalPrice dec(2),totalDetailPrice dec(2) ,totalYearbusiness dec(2);
Char : formaNum1:128,formatotalEdit:128,formatotalLevel:128,formatotalpercent:128, filestylecss:255;
INTEGER : Totalorders,TotalEmployee,totallevelNum,Sql_totalOrderId,totalcountry,TotalordersByEmployee,TotalordersBycountry;
INTEGER : totalYearORder;
#include "#SYSPATHMS4BI+\02-DEMO-DESKTOP-BI-EXCELandSTANDARD\99-DATABASE\VersionADO\300-00-CreateDBDemoExcel.ms4"
GetDirSysPathMS4BI(LpathDataBaseExcel);
Concatene LpathDataBaseExcel,"\zInclude\css\StyleReportDesign\standardStyleReport.css" into fileStyleCss;
Display "Wait...calculate : totalorder ..(not detail order)";
DBconnect{ms4db}(LEnvDemoExcelDB) ;
Ms4_sql{ms4db} ( " Create temporary View [TotalOrderID] as SELECT count(DISTINCT OrderID) as TOTALORDERID from [ms4EmplConsolidationBusiness] ");
Ms4_SQLFetch{ms4db}("SELECT * FROM [TotalOrderID] ")
Row_ForEach :
Sql_totalOrderId := Column_GetData:1,INTEGER;
Display "----[TotalOrderID] as SELECT count(OrderID) as TOTALORDERID (column 1) :--->",Sql_totalOrderId;
End_Row_ForEach ;
DBconnect{Ms4DB}(LEnvDemoExcelDB);
Ms4_Query{Ms4DB} option : into $MS4DBTMP (" SELECT DISTINCT a.orderID ,a.employeeid,a.LastName , a.CustomerID , a.ShipName, " +
" a.ShipAddress,a.ShipCity,a.ShipRegion,a.ShipPostalCode,a.ShipCountry" +
" from [ms4EmplConsolidationBusiness] as a") ;
** Result query in output --> table View temporary MS4 db : $ms4ViewDBtmp
Sql_DestroyEnv();
CALL:ms4Script("Ms4wait2");
Setting :
Chart :
Backgroundcolor : $color_bkms4bi ;
** Declare report Data
DECLARE SCHEMA_REPORT : ReportDesign
{ integer : EmployeeID ,OrderID ;
TEXT : LastName , CustomerID , ShipName, ShipAddress,ShipCity,ShipRegion,ShipPostalCode,ShipCountry ;
} ;
BEGIN_DASHBOARD
option :
BEGIN
type : $TABSTRIP ,
style : $blue ,
title : " DASHBOARD : ANALYSIS EXCEL CONSOLIDATION :BUSINESS EMPLOYEE"
END
** *****************************************
** REPORT 1
** *****************************************
Begin_Report
REPORTINPUT : DBconnect { Ms4DB} ($MS4DBTMP) use View ($ms4ViewDBtmp)
REPORTFORM:DESIGN
Group Order by : ReportDesign.EmployeeID
LinkCss : fileStyleCss
Start_Design :
Report_Header
Print : " ";
Print : "