oBrw:Report

oBrw:Report

Postby damianodec » Tue Jul 11, 2017 2:09 pm

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
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 414
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: oBrw:Report

Postby Otto » Tue Jul 11, 2017 9:36 pm

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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 5994
Joined: Fri Oct 07, 2005 7:07 pm

Re: oBrw:Report

Postby nageswaragunupudi » Tue Jul 11, 2017 10:12 pm

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
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10206
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: oBrw:Report

Postby damianodec » Wed Jul 12, 2017 7:37 am

thank you mr Rao
is this correct?

Code: Select all  Expand view
function MyRepPostEnd( oRep )

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

return nil
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 414
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: oBrw:Report

Postby nageswaragunupudi » Wed Jul 12, 2017 4:38 pm

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10206
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: oBrw:Report

Postby damianodec » Thu Jul 13, 2017 6:20 am

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)
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 414
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: oBrw:Report

Postby Otto » Thu Jul 13, 2017 4:11 pm

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
 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 5994
Joined: Fri Oct 07, 2005 7:07 pm

Re: oBrw:Report

Postby damianodec » Fri Jul 14, 2017 7:07 am

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
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
damianodec
 
Posts: 414
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: oBrw:Report

Postby Otto » Fri Jul 14, 2017 10:27 am

Hello,
I am sorry I didn't read you question well.
I never tried to configure oBrw:report myself.
Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 5994
Joined: Fri Oct 07, 2005 7:07 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 10 guests