Code: Select all
Error occurred at: 04-05-2020, 10:49:40
Error description: Error BASE/1004 Metodo non disponibile: SETRANGE
Args:
[ 1] = U
[ 2] = D 04-05-2020
Stack Calls
===========
Called from: => SETRANGE( 0 )
Called from: test.prg => (b)BUILDRIBBONBAR( 92 )
Called from: .\source\classes\TDTPICKE.PRG => TDATEPICK:CHANGE( 454 )
Called from: .\source\classes\TDTPICKE.PRG => TDATEPICK:_CTEXT( 396 )
Called from: .\source\classes\TDTPICKE.PRG => TDATEPICK:NEW( 180 )
Called from: test.prg => BUILDRIBBONBAR( 92 )
Called from: test.prg => TEST( 52 )
Called from: test.prg => MAIN( 30 )
the test
Code: Select all
#include "fivewin.ch"
#include "constant.ch"
#include "ord.ch"
#include "dtpicker.ch"
#include "ribbon.ch"
REQUEST HB_Lang_IT
REQUEST HB_CODEPAGE_ITWIN
REQUEST DBFCDX
REQUEST DBFFPT
EXTERNAL ORDKEYNO,ORDKEYCOUNT,ORDCREATE,ORDKEYGOTO
static dDataIniziale,dDataFinale,lShowNumeri,lshowPagamenti
static oWndMain,cIniFile,oRebar
FUNCTION Main()
HB_LangSelect("IT")
HB_SetCodePage("ITWIN")
SET _3DLOOK ON
SET CENTURY ON
SET DATE ITALIAN
RDDSetDefault( 'DBFCDX' )
test()
RETURN NIL
//--------------------------------------------------//
Function test()
local oFont
cIniFile := cFilePath( GetModuleFileName( GetInstance() ) ) + "test.ini"
DEFINE WINDOW oWndMain ;
TITLE "test"
dDataIniziale := date()
dDataFinale := date()
lShowNumeri := .t.
lshowPagamenti := .f.
BuildRibbonBar()
activate()
return nil
//--------------------------------------------------//
Function BuildRibbonBar()
local aRbPrompts:={"Spiaggia","Planner","Gestione","Stampe","Visualizza","Configurazione","Strumenti"}
local oGrS1
local dMin := {^ 2020/03/05 }
local dMax := {^ 2020/03/20 }
local dFirst := {^ 2020/03/07 }
local dLast := {^ 2020/03/10 }
local oDtpFirst, oDtpLast
local nAltezzaRibbon:= 134
oRebar := TRibbonBar():New(oWndMain, aRbPrompts,,,,nAltezzaRibbon,22,CLR_WHITE,RGB(165,186,204),,,,,,,,.T.,)
DEFINE FONT oFont NAME "Segoe UI" SIZE 0,-16
ADD GROUP oGrS1 RIBBON oRebar TO OPTION 1 WIDTH 625 PROMPT "Periodo da visualizzare"
@ 30, 30 DTPICKER oDtpFirst VAR dFirst SIZE 200,28 PIXEL OF oGrS1 ;
PICTURE "ddd dd mmm yyyy" ;
ON CHANGE ( oDtpLast:SetRange( dFirst ), oGrS1:Update() )
WITH OBJECT oDtpFirst
:lNoToday := .t.
:lNoTodayCircle := .t.
:SetRange( dMin, dMax )
END
@ 65, 30 BTNBMP PROMPT "-" SIZE 30,30 PIXEL OF oGrS1 FLAT ;
ACTION ( dFirst--, oDtpFirst:SetFocus() )
@ 65,200 BTNBMP PROMPT "+" SIZE 30,30 PIXEL OF oGrS1 FLAT ;
ACTION ( dFirst++, oDtpFirst:SetFocus() )
@ 30,250 DTPICKER oDtpLast VAR dLast SIZE 200,28 PIXEL OF oGrS1 ;
PICTURE "ddd dd mmm yyyy" ON CHANGE oGrS1:Update()
WITH OBJECT oDtpLast
:lNoToday := .t.
:lNoTodayCircle := .t.
:SetRange( dFirst, dMax )
END
@ 65,250 BTNBMP PROMPT "-" SIZE 30,30 PIXEL OF oGrS1 FLAT ;
ACTION ( dLast--, oDtpLast:SetFocus() )
@ 65,420 BTNBMP PROMPT "+" SIZE 30,30 PIXEL OF oGrS1 FLAT ;
ACTION ( dLast++, oDtpLast:SetFocus() )
return nil
//---------------------------------------------------------------------------------------//
Function activate()
ACTIVATE WINDOW oWndMain
return nil
//---------------------------------------------------------------------------------------//
//---------------------------------------------------------------------------------------//
I tested also on xbrowse
Code: Select all
WITH OBJECT oBrowse:aCols[ 8]
:nEditType:= EDIT_DATE
:oEditGet:setrange(ctod("17/05/2020"),ctod("20/09/2020"))
:bOnChange := bCalcRow
END