REQUEST DBFCDX
REQUEST DBFFPT
function Main()
local cFileNoExtention := "report"
SET EXCLUSIVE OFF
//csv_report_erstellen( cFileNoExtention )
TEMPLATE
<html lang="en">
<head>
<title>Panels</title>
<link rel="stylesheet" href="
https://maxcdn.bootstrapcdn.com/bootstr ... ap.min.css">
<script src="
https://ajax.googleapis.com/ajax/libs/j ... "></script>
<script src="
https://maxcdn.bootstrapcdn.com/bootstr ... "></script>
<script src="
https://fivetechsoft.github.io/xcloud/s ... "></script>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.loader {
margin: 70px;
border: 16px solid #f3f3f3;
border-radius: 50%;
border-top: 16px solid #3498db;
width: 120px;
height: 120px;
-webkit-animation: spin 2s linear infinite; /* Safari */
animation: spin 2s linear infinite;
}
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
100% { -webkit-transform: rotate(360deg); }
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
<div class="container">
<div class="loader"></div>
</div>
ENDTEXT
csv_report_erstellen( cFileNoExtention )
TEMPLATE
<div class="container">
<script>location.replace("
https://my3zinnen.com/test/reports/basi ... /index.php");</script>
</div>
</body>
ENDTEXT
return nil
//----------------------------------------------------------------------------//
INIT PROCEDURE PrgInit
SET CENTURY ON
SET EPOCH TO YEAR(DATE())-98
SET DELETED ON
SET EXCLUSIVE OFF
REQUEST HB_Lang_DE
REQUEST HB_CODEPAGE_DEWIN
HB_LangSelect("DE")
// HB_SetCodePage("DEWIN")
SET DATE TO GERMAN
// SetHandleCount(205)
rddsetdefault( "DBFCDX" )
//SetGetColorFocus()
EXTERN DESCEND
RETURN
//----------------------------------------------------------------------------//
function csv_report_erstellen( cFileNoExtention )
local cline := ""
local cheader := "customerName;productName;productLine;orderDate;orderDay;orderMonth;orderYear;orderQuarter;dollar_sales"
local n := 0
local aTemp := {}
local ISeek := 0
local aFeld := {}
*----------------------------------------------------------
cline += cheader + CRLF
use ( "c:\xampp\htdocs\samples\test\umsatz.dbf" ) new SHARED
do while .not. eof()
if umsatz->wert > 0
if umsatz->datum > ctod("01.01.2019")
ISeek := ASCAN( aTemp, {|aVal| aVal[1] == Alltrim( umsatz->name) + " " + ALLTRIM(umsatz->ort) })
if ISeek != 0
aTemp[ ISeek, 2 ] += umsatz->wert
else
aadd( aTemp ,{Alltrim( umsatz->name) + " " + ALLTRIM(umsatz->ort), umsatz->wert } )
endif
endif
endif
skip
enddo
use
TEMPLATE PARAMS aTemp
<?prg str( len(aTemp)) ?>
ENDTEXT
FOR I := 1 to len(aTemp)
cline += aTemp[I,1 ] + " ; ; ; ; ; ; ; ; " + str( aTemp[I,2 ] ) + CRLF
if I > 150
exit
endif
next
hb_memowrit( "c:\xampp\htdocs\test\databases\customer_product_dollarsales2.csv", cLine, .f. )
return nil
//----------------------------------------------------------------------------//