FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour little blug in xBrowse method report()
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
little blug in xBrowse method report()
Posted: Tue Jun 04, 2013 11:40 AM
Hello,

In method report(), it does not show on the preview Windows the title of the report, it says Fivewin Report instead.



This is a simple:

Code (fw): Select all Collapse
#include "fivewin.ch"
#include "xbrowse.ch"

// Link with xhb.lib if compiled with Harbour

function TestMain()

   local oWnd, oBar, oBrw

   DEFINE WINDOW oWnd TITLE "XBrowsing Empty Arrays"

   DEFINE BUTTONBAR OBAR OF oWnd SIZE 100,32 2007

   DEFINE BUTTON OF oBar PROMPT "Add"     ACTION ( AddRow( oBrw ),    oBrw:SetFocus() )
   DEFINE BUTTON OF oBar PROMPT "Insert"  ACTION ( InsertRow( oBrw ), oBrw:SetFocus() )
   DEFINE BUTTON OF oBar PROMPT "Delete"  ACTION ( DeleteRow( oBrw ), oBrw:SetFocus() )
   DEFINE BUTTON OF oBar PROMPT "Close"   ACTION oWnd:End() GROUP

   DEFINE BUTTON OF oBar PROMPT "Report"   ACTION oBrw:Report("This is the title") GROUP



   SET MESSAGE OF oWnd TO "" 2007

   @ 0,0 XBROWSE oBrw OF oWnd               ;
      COLUMNS 1, 2, 3, 4                    ;
      HEADERS "uno","dos","tres","cuatro"   ;
      COLSIZES 100, 100, 100, 100           ;
      ARRAY {} LINES FASTEDIT CELL

   WITH OBJECT oBrw
      :nEditTypes   := EDIT_GET
      :bPastEof     := { ||  AddRow( oBrw ) }
      :bKeyDown  := { |nKey| If( nKey == VK_DELETE, DeleteRow( oBrw ), ;
                              If( nKey == VK_INSERT, InsertRow( oBrw ), ;
                              nil ) ) }
      :CreateFromCode()
   END

   oWnd:oClient := oBrw

   ACTIVATE WINDOW oWnd

return nil

static function BlankRow
return { "    ", "    ", "    ", "    " }

static function AddRow( oBrw )

   AAdd( oBrw:aArrayData, BlankRow() )
   oBrw:Refresh()
   oBrw:GoBottom()

return nil

static function InsertRow( oBrw )

   AIns( oBrw:aArrayData, oBrw:nArrayAt, BlankRow(), .t. )
   oBrw:Refresh()

return nil

static function DeleteRow( oBrw )

   if ! Empty( oBrw:aArrayData )
      ADel( oBrw:aArrayData, oBrw:nArrayAt, .t. )
      oBrw:Refresh()
   endif

return nil



Thank you very much. Best regards
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: little blug in xBrowse method report()
Posted: Wed Jun 05, 2013 08:25 AM

Please, include the fix ein FW 13.05.

Thank you very very much.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: little blug in xBrowse method report()
Posted: Wed Jun 05, 2013 08:52 AM
This is the fix:

Code (fw): Select all Collapse
  

METHOD Report( cTitle, lPreview, lModal, bSetUp, aGroupBy, cPDF ) CLASS TXBrowse

[...]


 oPrn :=  PrintBegin( cTitle, ;            // document
                        .f., ;            // luser
                        lPreview, nil, ;  // xmodel
                        lModal, ;
                        .f.,    ;         // lselect
                        cPDF )            // PDF to Save


Change nil to cTitle.


Thank you.
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producción]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: little blug in xBrowse method report()
Posted: Wed Jun 05, 2013 04:22 PM

Included in FWH 13.05m thanks :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion