FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Report problem with Tdatabase
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Report problem with Tdatabase
Posted: Fri Mar 10, 2023 04:18 PM
after select the cSigla value

I made on Report class

ACTIVATE REPORT oReport FOR oDbf:PROV == cSigla

why it not run ok ? oDbf:Prov is 2cr as cSigla

Code (fw): Select all Collapse
Function Report_Comuni(oGrid,oParent,odbf)
   local oRep

   local nRecno   := odbf:Recno()
   local nOrder   := oDbf:OrdSetFocus()

   local oFont3, oFont2, oFont1,oFont4
   local cFooter := "footers"
   local cSigla:="TE"

   oDbf:setorder(3)
   oDbf:GoTop()

     DEFINE FONT oFont1 NAME "ARIAL" SIZE 0,-10
     DEFINE FONT oFont2 NAME "ARIAL" SIZE 0,-10 BOLD
     DEFINE FONT oFont3 NAME "ARIAL" SIZE 0,-10 BOLD ITALIC




   REPORT oRep ;
         TITLE  " ","-","-","Stampa elenco comuni" CENTERED;
         FONT   oFont3, oFont2, oFont1 ;
         HEADER '', oApp():cAppName+oApp():cVersion, oApp():cUser   ;
         FOOTER cFooter, "Data: "+dtoc(date())+ "   Pagina.: "+str(oRep:nPage,3) ;
         CAPTION oApp():cAppName+oApp():cVersion PREVIEW



   COLUMN TITLE "Comune" DATA oDbf:comune
   COLUMN TITLE "Provincia" DATA oDbf:prov



   ENDREPORT

   oRep:bSkip  := { || (oDbf:Skip( 1 )) }
   oRep:cellview()




   ACTIVATE REPORT oRep for oDbf:prov==cSigla;
      ON POSTEND  (oRep:Say(1, 'Totale comuni: '+Tran(oRep:nCounter, '@ 999,999'), 1) )

      oDbf:OrdSetFocus(nOrder)
      oDbf:GoTo(nRecno)

     oFont1:End()
     oFont2:End()
     oFont3:End()

    oGrid:Refresh()
    oGrid:SetFocus( .t. )
  return nil
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
Posts: 1344
Joined: Wed Nov 16, 2005 09:14 PM
Re: Report problem with Tdatabase
Posted: Fri Mar 10, 2023 04:35 PM

Silvio, tiene que ser igual igual? O sea, diferencia entre mayusculas y minusculas? Y tiene 2 caracteres?

Sino has la prueba con for oDbf:prov=cSigla

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Report problem with Tdatabase
Posted: Mon Mar 13, 2023 09:24 AM

Now run only I used a filter with exec comand

Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)

I use : FiveWin for Harbour March-April 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com

Continue the discussion