Page 1 of 1

Number Total Pages

PostPosted: Fri Jun 23, 2023 9:12 am
by Silvio.Falconi
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 )

Re: Number Total Pages

PostPosted: Fri Jun 23, 2023 10:35 am
by karinha
Maybe:

Code: Select all  Expand view

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


Regards, saludos.

Re: Number Total Pages

PostPosted: Fri Jun 23, 2023 10:41 am
by Silvio.Falconi
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 )