I'm using Tcalex class and citas.dbf
the user select the date pick and when the report is activated
ACTIVATE REPORT oRep FOR dDesde <= citas->dStart .AND. citas->dend <= dHasta
but not execute this command but print only the one date
Code: Select all
function Imprime( dFecha )
local oRep
local oFont1, oFont2, acor, oDlg1, oGet1, oGet2, oGet3, oBot1, oBot2
local lRep := .f.
local dDesde
local dHasta
local mestado := 1
Local nBottom := 12
Local nRight := 60
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
local oBtnPrt,oBtnExit
local aGet[3]
DEFAULT dFecha := oApp():oCalex:dDateSelected
dDesde := dFecha
dHasta := dFecha + 7
DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD
DEFINE DIALOG oDlg1 ;
SIZE nWidth, nHeight PIXEL ;
TITLE "Stampa appuntamenti"
oDlg1:lHelpIcon := .F.
oDlg1:nStyle := nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, 4 )
* oDlg1:SetFont( oFont1 )
@ 12, 05 SAY "Stato:" OF oDlg1 PIXEL SIZE 50,12
@ 10, 45 COMBOBOX oGet1 VAR mestado OF oDlg1 SIZE 60,12 PIXEL ;
ITEMS { "Tutte", "Solo pendenti", "Solo effettuate" }
@ 44,05 SAY "Data Inizio" OF oDlg1 SIZE 50,10 PIXEL TRANSPARENT
@ 44,108 SAY "Data Fine" OF oDlg1 SIZE 50,10 PIXEL TRANSPARENT
@ 42,45 DTPICKER oGet2 VAR dDesde OF oDlg1 SIZE 50,10 PIXEL UPDATE
@ 42,148 DTPICKER oGet3 VAR dHasta OF oDlg1 SIZE 50,10 PIXEL UPDATE
@ 70, 92 BUTTON oBtnPrev ;
PROMPT "&Stampa" OF oDlg1 PIXEL SIZE 45, 12 ;
ACTION oDlg1:end( IDOK )
@ 70, 188 BUTTON oBtnExit;
PROMPT "&Annulla" OF oDlg1 PIXEL SIZE 45, 12 ;
ACTION oDlg1:end( IDCANCEL )
ACTIVATE DIALOG oDlg1 CENTER
IF oDlg1:nresult == IDOK
REPORT oRep ;
TITLE "Appuntamenti" + " dal " + DTOC( dDesde ) + " al " + DTOC( dHasta ) LEFT ;
FONT oFont1, oFont2 ;
HEADER OemToAnsi( "01" ) RIGHT ;
FOOTER "pagina: " + STR( oRep:nPage, 3 ) ,"Data: " + DToc( DATE() ) LEFT ;
PREVIEW CAPTION "Appuntamenti"
COLUMN TITLE "Codice" DATA citas->idx SIZE 07 FONT 1
COLUMN TITLE "Cliente" DATA Left( citas->subject, 40 ) SIZE 20 FONT 1
COLUMN TITLE "Data" DATA citas->dStart SIZE 08 FONT 2
COLUMN TITLE "Da" DATA TRANSFORM( citas->start, "999:99" ) SIZE 05 FONT 1 RIGHT
COLUMN TITLE "a" DATA TRANSFORM( citas->end, "999:99" ) SIZE 05 FONT 1 RIGHT
COLUMN TITLE "Note" DATA citas->text SIZE 25 FONT 1 MEMO
COLUMN TITLE "Data" DATA citas->dend SIZE 08 FONT 2
// Digo que el titulo lo escriba con al letra 2
oRep:oTitle:aFont[1] := {|| 2 }
oRep:oTitle:aFont[1] := {|| 2 }
oRep:bInit := {|| citas->( DbGoTop() ) }
//oRep:bSkip := {|| ( ::cAlias )->Skip() }
END REPORT
ACTIVATE REPORT oRep FOR dDesde <= citas->dStart .AND. citas->dend <= dHasta ;
ON POSTEND (oRep:Say(1, 'Totale appuntamenti: '+Tran(oRep:nCounter, '@ 999,999'), 1) )
endif
RETURN nil
//-------------------------------------------------------------------------------------------//
I tried with EmadDbu and the filter run ok
I made the same on fwh source why not run ?