Page 1 of 1

oBrw:Report

PostPosted: Tue Jul 11, 2017 2:09 pm
by damianodec
hi
can I get any example to add page on the bottom of oBrw:Report ?

thank you
--------------------------------------------------
FiveWin for xHarbour 12.01 - Jan. 2012 xHarbour development power
(c) FiveTech, 1993-2012 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7

Re: oBrw:Report

PostPosted: Tue Jul 11, 2017 9:36 pm
by Otto
Code: Select all  Expand view

 REPORT oReport TITLE " ",cTITLE+"   "+ dtoc(anfang)+" - "+dtoc(ende)," "  LEFT ;
            FONT   oFont1,;
            oFont2,;
            oFont3 ;
            PEN oPen1;
            HEADER Setup():LizenzNehmer()," ", ALLTRIM("Erstellt: " + dtoc(date())+ " - "+time()) RIGHT;
            FOOTER "Seite " + Str(oReport:nPage,3) RIGHT PREVIEW
 

Best regards,
Otto

Re: oBrw:Report

PostPosted: Tue Jul 11, 2017 10:12 pm
by nageswaragunupudi
Code: Select all  Expand view

oBrw:Report( cTitle, lPreview, lModal, { |oRep,oBrw,n| RepSetup( oRep, oBrw, n ) } )

...
...

function RepSetup( oRep, oBrw, n )

   oRep:bPostEnd := { || MyRepPostEnd( oRep ) }

return nil

function MyRepPostEnd( oRep )

< your code to add page at the end of report >

return nil
 

Re: oBrw:Report

PostPosted: Wed Jul 12, 2017 7:37 am
by damianodec
thank you mr Rao
is this correct?

Code: Select all  Expand view
function MyRepPostEnd( oRep )

oRep:oFooter:aLine := Str(oRep:nPage,3)

return nil

Re: oBrw:Report

PostPosted: Wed Jul 12, 2017 4:38 pm
by nageswaragunupudi
can I get any example to add page on the bottom of oBrw:Report ?

If you mean page numbers at the bottom of each page, oBrw:Report() method automatically prints page numbers at the bottom of each page. You do not need to do anything.

Re: oBrw:Report

PostPosted: Thu Jul 13, 2017 6:20 am
by damianodec
hi mr Rao
with this code I get page number:
Code: Select all  Expand view
oBrw:Report( "INTEST" .t., nil, { |oRep,oBrw,n| RepSetup( oRep, oBrw, n ) } , nil)

*-----------------------------------------------------------------------------------
function RepSetup( oRep, oBrw, n )

   oRep:oFooter := TrLine():New( {{|| "Page : "+Str(oRep:nPage,3)} }, oRep, 3 )
return nil
 


and with this code, no:
Code: Select all  Expand view
oBrw:Report( "INTEST" .t., nil, nil, nil)

Re: oBrw:Report

PostPosted: Thu Jul 13, 2017 4:11 pm
by Otto
Hello,
have you tired to use FOOTER when defining the report.
Best regards,
Otto

Code: Select all  Expand view
REPORT oReport TITLE " ",cTITLE+"   "+ dtoc(anfang)+" - "+dtoc(ende)," "  LEFT ;
            FONT   oFont1,;
            oFont2,;
            oFont3 ;
            PEN oPen1;
            HEADER Setup():LizenzNehmer()," ", ALLTRIM("Erstellt: " + dtoc(date())+ " - "+time()) RIGHT;
            FOOTER "Page " + Str(oReport:nPage,3) RIGHT PREVIEW
 

Re: oBrw:Report

PostPosted: Fri Jul 14, 2017 7:07 am
by damianodec
hi Otto
thank you for your reply.
I would like to use Report from XBROWSE.
this is my target.
I have my first dialog with e large Get
Code: Select all  Expand view
@ 40, 10 GET oGet VAR mGet MEMO OF oDlg SIZE 450, 200 PIXEL

in this get I insert a SQL istruction SELECT (some fields) FROM Table LEFT JOIN Table etc...)
then there is ADO connection and in 2nd dialog I have my XBROWSE With the chosen fields (Depends on the SELECT)
in this dialog I have BUTTON to export in EXCEL... ACTION (oBrw:ToExcel()) and BUTTON to print REPORT ACTION (oBrw:Report(...))
And I'd like to understand oBrw:Report parameters

Re: oBrw:Report

PostPosted: Fri Jul 14, 2017 10:27 am
by Otto
Hello,
I am sorry I didn't read you question well.
I never tried to configure oBrw:report myself.
Best regards,
Otto