Is it possible to have a progressbar or a meter into oReport class.
Thanks in advance
Otto
function rg_kontroll_druck(oStam)
local oReport,oFont1, oFont2, oFont3, oPen1, oline,cTITLE:="Rechnungs-Zusammenstellung vom"
local anfang := date()-1
local ende := date()-1
local oDlg
local ok := .f.
*----------------------------------------------------------
DEFINE DIALOG oDlg RESOURCE "Vonbis" TITLE "Rechnungszusammenstellung"
REDEFINE GET anfang ID 101 of oDlg picture("@D") SPINNER
REDEFINE GET ende ID 102 of oDlg picture("@D") SPINNER
REDEFINE BUTTONBMP ID 2 OF oDlg ;
ACTION oDlg:END() CANCEL ;
BITMAP ".\bitmaps\Delete.bmp" TEXTRIGHT
REDEFINE BUTTON ID 1 OF oDlg ACTION (OK:=.T.,oDlg:END())
ACTIVATE DIALOG oDlg CENTERED
IF OK = .T.
DEFINE PEN oPen1 WIDTH 0.5
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-9
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-8
DEFINE FONT oFont3 NAME "ARIAL" SIZE 0,-14 BOLD
select umsatz
set order to tag u_renr
Go Top
REPORT oReport TITLE " ",cTITLE+" "+ dtoc(anfang)+" - "+dtoc(ende)," " LEFT ;
FONT oFont1,;
oFont2,;
oFont3 ;
PEN oPen1;
HEADER Setup():LizenzNehmer()," ", ALLTRIM("Erstellt: " + dtoc(date())+ " - "+time()) RIGHT;
FOOTER "Seite " + Str(oReport:nPage,3) RIGHT PREVIEW
COLUMN TITLE "Artnum" DATA umsatz->artnum SIZE 8 FONT 2
COLUMN TITLE "Bezeichnung" DATA umsatz->bezeichnun SIZE 26
COLUMN TITLE "an" DATA umsatz->datum1 SIZE 8 FONT 2
COLUMN TITLE "ab" DATA umsatz->datum2 SIZE 8 FONT 2
COLUMN TITLE "Menge" DATA umsatz->menge SIZE 5 PICTURE "999,999,999.9"
COLUMN TITLE "Preis" DATA umsatz->preis SIZE 6 PICTURE "999,999,999.99" FONT 2
COLUMN TITLE "Wert" DATA umsatz->wert TOTAL SIZE 8 PICTURE "999,999,999.99"
COLUMN TITLE "Anzhg" DATA iif(umsatz->Anzhg<>0, umsatz->Anzhg,"") TOTAL SIZE 8 PICTURE "999,999,999.99"
COLUMN TITLE "Barzhg" DATA iif(umsatz->Barzhg<>0, umsatz->Barzhg,"") TOTAL SIZE 8 PICTURE "999,999,999.99"
COLUMN TITLE "Karte" DATA iif(umsatz->Karte<>0, umsatz->Karte,"") TOTAL SIZE 8 PICTURE "999,999,999.99"
COLUMN TITLE "Scheck" DATA iif(umsatz->Scheck<>0, umsatz->Scheck,"") TOTAL SIZE 8 PICTURE "999,999,999.99"
COLUMN TITLE "Kredit" DATA iif(umsatz->Kredit<>0, umsatz->Kredit,"") TOTAL SIZE 8 PICTURE "999,999,999.99"
GROUP ON umsatz->renr HEADER xPADR(ALLTRIM(str(umsatz->renr)),85)+xPADr(ALLTRIM(umsatz->name),195)+dtoc(umsatz->datum) FOOTER "Summe" FONT 3
END REPORT
oReport:CellView()
oLine:= oReport:oTitle
oLine:aFont[2] := {|| 3}
ACTIVATE REPORT oReport ;
FOR umsatz->datum >=anfang .AND. umsatz->datum <= ende ;
ON STARTGROUP oReport:NewLine()
oPen1:End()
oFont1:End()
oFont2:End()
oFont3:End()
endif
return nil
//----------------------------------------------------------------------------//
iif(umsatz->Anzhg<>0, umsatz->Anzhg,"") PICTURE "999,999,999.99"
umsatz->Anzhg PICTURE "@Z 999,999,999.99"
select umsatz
index on umsatz->datum TAG TEMPDAT3 TO TEMP TEMPORARY FOR (umsatz->datum >= (anfang) .AND. umsatz->datum <= (ende))
index on dtos(field->datum)+str(field->renr) tag u_datrg //12
...
select umsatz
//index on umsatz->datum TAG TEMPDAT3 TO TEMP TEMPORARY FOR (umsatz->datum >= (anfang) .AND. umsatz->datum <= (ende))
set order to tag u_datrg
umsatz->(ordScope(0, dtos(anfang) )) // set top scope
umsatz->(ordScope(1, dtos(ende) ) ) // set bottom scope
umsatz->(dbgotop())
#include "fivewin.ch"
REQUEST ADS
function main()
LOCAL oDlg, consulta := SPACE(400), oLbx, path := SPACE(80),;
connect, tipo := "CDX", hconn
RddRegister("ads",1)
RddSetDefault("Ads")
AdsSetServerType ( 1 ) // local
AdsSetFileType(3)
SET DELETED ON
adsRightsCheck( .F. )
DEFINE DIALOG oDlg RESOURCE "consulta"
REDEFINE COMBOBOX tipo ID 108 ITEMS {"NTX","CDX","ADT"} OF oDlg ;
ON CHANGE AdsSetFileType( IF( tipo == "NTX", 1, ;
IF( tipo == "CDX", 2, 3 ) ) )
REDEFINE GET path ID 102 OF oDlg
REDEFINE BUTTON ID 103 OF oDlg ACTION ( AdsDisconnect( hconn ),;
IF ( AdsConnect60( path , 1,"ADSSYS",,@hconn), ;
connect:setcolor(CLR_GREEN, CLR_GREEN),;
connect:setcolor(CLR_HRED, CLR_HRED ) ;
),;
connect:refresh() ;
)
REDEFINE SAY connect PROMPT " " ID 110 OF oDlg COLOR CLR_HRED, CLR_HRED
REDEFINE GET consulta ID 104 OF oDlg
REDEFINE BUTTON ID 106 OF oDlg ACTION resultado( consulta )
REDEFINE BUTTON ID 107 OF oDlg ACTION oDlg:end()
ACTIVATE DIALOG oDlg
dbcloseall()
AdsDisconnect( hconn )
return nil
FUNCTION resultado( consulta )
LOCAL oDlg, oLbx,e
ADSCreateSQLStatement("SQLarea",2)
IF ADSExecuteSQLDirect( consulta )
TRY
DEFINE DIALOG oDlg RESOURCE "resultado"
REDEFINE LISTBOX oLbx FIELDS ALIAS "SQLarea" ID 101 OF oDlg
REDEFINE SAY PROMPT "RESULTADO : " + ALLTRIM( STR ( SQLarea -> ( LASTREC() ) ) ) ID 200 OF oDlg COLOR CLR_BLUE
REDEFINE BUTTON ID 102 OF oDlg ACTION oDlg:end()
REDEFINE BUTTON ID 103 OF oDlg ACTION oLbx:report()
ACTIVATE DIALOG oDlg
sqlarea -> ( DBCLOSEAREA() )
CATCH e
? "COMANDO EJECUTADO"
END
ELSE
MSGINFO("Error en la ejecución de la consulta")
sqlarea -> ( DBCLOSEAREA() )
ENDIF
RETURN NIL
CONSULTA DIALOG 29, 88, 436, 141
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU
CAPTION "ADS - SQL"
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
CONTROL "", 108, "COMBOBOX", CBS_DROPDOWNLIST | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 40, 11, 49, 43
CONTROL "", 102, "EDIT", ES_LEFT | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 136, 11, 219, 12
CONTROL "conectar", 103, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 360, 11, 50, 14
CONTROL "", 104, "EDIT", ES_LEFT | ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 13, 40, 414, 57
CONTROL "Ejecutar", 106, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 376, 101, 50, 14
CONTROL "Salir", 107, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 376, 124, 50, 14
CONTROL "Local Path", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 94, 13, 40, 8
CONTROL "Consulta SQL", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 13, 29, 60, 8
CONTROL "", 110, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 414, 11, 12, 12
CONTROL "Tipo", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 13, 12, 22, 8
CONTROL "", -1, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 5, 0, 428, 120
}
RESULTADO DIALOG 8, 27, 400, 188
STYLE DS_SYSMODAL | 0x4L | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "RESULTADO CONSULTA"
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
CONTROL "", 101, "TWBrowse", 0 | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP, 5, 7, 390, 159
CONTROL "Salir", 102, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 345, 171, 50, 14
CONTROL "RESULTADO", 200, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 6, 174, 93, 8
CONTROL "Reporte", 103, "BUTTON", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 294, 171, 50, 14
}
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 59 guests