Number Total Pages

Number Total Pages

Postby Silvio.Falconi » Fri Jun 23, 2023 9:12 am

on a Report from Xbrowse I use a function

I wisth show the total pages I tried with

LTrim( Str( Len( oRep:oDevice:oDevice:aMeta ) ) )

but not run

oBrw:Report( cTitle, , , ;
{ |oRep, oBrw| MySetUp( oRep, oBrw, oDbf,aGroup,nGroup,lEject,aFields ) })


function MySetUp( oRep, oBrw, oDbf,aGroup,nGroup,lEject,afields )


local nTotalpages:=0 // LTrim( Str( Len( oRep:oDevice:oDevice:aMeta ) ) )


oRep:oheader := TrLine():New( {{||cTitle1},{||cTitle2} }, oRep, 0 )
oRep:oTitle := TrLine():New( {{|| cf(date())+"- Pagina : "+Str(oRep:nPage,3)+"/"+Str(nTotalpages,3)} }, oRep, 2 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7052
Joined: Thu Oct 18, 2012 7:17 pm

Re: Number Total Pages

Postby karinha » Fri Jun 23, 2023 10:35 am

Maybe:

Code: Select all  Expand view

   ::nTotalPages := Round(::nCount/::nPageSize,0)
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7805
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: Number Total Pages

Postby Silvio.Falconi » Fri Jun 23, 2023 10:41 am

karinha wrote:Maybe:

Code: Select all  Expand view

   ::nTotalPages := Round(::nCount/::nPageSize,0)
 


Regards, saludos.


Error description: Error BASE/1004 Message not found: TREPORT:NCOUNT
Args:
[ 1] = O TREPORT

Stack Calls
===========
Called from: => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TREPORT:ERROR( 0 )
Called from: ../../../tobject.prg => (b)HBOBJECT( 0 )
Called from: ../../../tobject.prg => TREPORT:MSGNOTFOUND( 0 )
Called from: ../../../tobject.prg => TREPORT:NCOUNT( 0 )
Called from: ut_prn.prg => MYSETUP( 372 )



Error description: Error BASE/1004 Message not found: TREPORT:NPAGESIZE
Args:
[ 1] = O TREPORT

Stack Calls
===========
Called from: => __ERRRT_SBASE( 0 )
Called from: ../../../tobject.prg => TREPORT:ERROR( 0 )
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 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
User avatar
Silvio.Falconi
 
Posts: 7052
Joined: Thu Oct 18, 2012 7:17 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 101 guests