Crystal Reports

Post Reply
kbelo
Posts: 34
Joined: Thu Jun 22, 2006 2:33 pm
Location: Criciuma-SC Brasil
Contact:

Crystal Reports

Post by kbelo »

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()

Marcelo Michels Alexandre
xHarbour 1.1 + Ws + Xmate + FW8.01 + BCC 5.82
R.F.
Posts: 840
Joined: Thu Oct 13, 2005 7:05 pm

Post by R.F. »

oCrystal:PESetTabLocation("c:\carpeta\otra\TEST.DBF")

la ruta tiene que se completa a donde esta el DBF del cual se realiza el infomre.
Saludos
R.F.
Post Reply