FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour oBrw:Report
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
oBrw:Report
Posted: Tue Jul 11, 2017 02: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 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: oBrw:Report
Posted: Tue Jul 11, 2017 09:36 PM
Code (fw): Select all Collapse
 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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: oBrw:Report
Posted: Tue Jul 11, 2017 10:12 PM
Code (fw): Select all Collapse
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
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Re: oBrw:Report
Posted: Wed Jul 12, 2017 07:37 AM
thank you mr Rao
is this correct?

Code (fw): Select all Collapse
function MyRepPostEnd( oRep )

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

return nil
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: oBrw:Report
Posted: Wed Jul 12, 2017 04: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
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Re: oBrw:Report
Posted: Thu Jul 13, 2017 06:20 AM
hi mr Rao
with this code I get page number:
Code (fw): Select all Collapse
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 (fw): Select all Collapse
oBrw:Report( "INTEST" .t., nil, nil, nil)
FiveWin for xHarbour 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: oBrw:Report
Posted: Thu Jul 13, 2017 04:11 PM
Hello,
have you tired to use FOOTER when defining the report.
Best regards,
Otto

Code (fw): Select all Collapse
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
Posts: 434
Joined: Wed Jun 06, 2007 02:58 PM
Re: oBrw:Report
Posted: Fri Jul 14, 2017 07: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 (fw): Select all Collapse
@ 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 24.02 - Feb. 2024 - Embarcadero C++ 7.60 for Win32 Copyright (c) 1993-2023

FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)

Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: oBrw:Report
Posted: 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

Continue the discussion