Crystal Reports
Posted: Fri Jul 07, 2006 8:21 pm
Como faço para o relatorio busque os valores do DBF
Code: Select all
DEFINE WINDOW oVentHija MDICHILD OF oWnd;
STYLE nSTYLE;
VSCROLL HSCROLL
oVentHija:oVScroll:SetRange(0,0)
oVentHija:oHScroll:SetRange(0,0)
oCrystal:PEOpenPrintJob(cReportName)
oCrystal:PESetTabLocation("TEST.DBF")
oCrystal:PeOutputToWindow( oVentHija )
oVentHija:oHScroll:bPos := {|nPos| hScroll(GO_POS, .f., nPos)}
oVentHija:oVScroll:bPos := {|nPos| vScroll(GO_POS, .f., nPos)}
ACTIVATE WINDOW oVentHija MAXIMIZED ON INIT (oCrystal:PeStartPrintJob(),;
hReport := oCrystal:PEGetWindowHandle(),;
WndSetSize(hReport,oVentHija:nWidth-7,oVentHija:nHeight-8,.T.));
ON UP vScroll(GO_UP) ;
ON DOWN vScroll(GO_DOWN) ;
ON PAGEUP vScroll(GO_UP,GO_PAGE) ;
ON PAGEDOWN vScroll(GO_DOWN,GO_PAGE) ;
ON LEFT hScroll(GO_LEFT) ;
ON RIGHT hScroll(GO_RIGHT) ;
ON PAGELEFT hScroll(GO_LEFT,GO_PAGE) ;
ON PAGERIGHT hScroll(GO_RIGHT,GO_PAGE);
ON PAINT (hReport := oCrystal:PEGetWindowHandle(),;
WndSetSize(hReport,oVentHija:nWidth-7,oVentHija:nHeight-8,.T.));
VALID (oCrystal:PEClosePrintJob(),.T.) .and. fecha()