little blug in xBrowse method report()

little blug in xBrowse method report()

Postby lucasdebeltran » 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.

Image

This is a simple:

Code: Select all  Expand view
#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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: little blug in xBrowse method report()

Postby lucasdebeltran » Wed Jun 05, 2013 8: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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: little blug in xBrowse method report()

Postby lucasdebeltran » Wed Jun 05, 2013 8:52 am

This is the fix:

Code: Select all  Expand view
 

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.
User avatar
lucasdebeltran
 
Posts: 1303
Joined: Tue Jul 21, 2009 8:12 am

Re: little blug in xBrowse method report()

Postby Antonio Linares » Wed Jun 05, 2013 4:22 pm

Included in FWH 13.05m thanks :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42092
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 99 guests