FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Creating a Report from a ListBox
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM

Creating a Report from a ListBox

Posted: Fri Jul 06, 2007 09:13 AM
This code gives a MsgYesNo Box with nothing in it.

"YES" - gives an error
"NO" - does nothing

Where is the problem?

#include 'FiveWin.ch'
#include "dbcombo.ch" //for DBCOMBO
#include "TCBrowse.ch" //TCBROWSE
#include "report.ch"
PROCEDURE search_print( oLbx )
   local oRpt
   local n
   Local nRecnum := RECNO()
   local cAlias := If( oLbx != nil, oLbx:cAlias, Alias() )
   REPORT oRpt TITLE "Report: " + cAlias ;
   HEADER "Date: " + DToC( Date() ) + ", Time: " + Time() ;
   FOOTER "Page: " + Str( oRpt:nPage, 3 ) PREVIEW

   if Empty( oRpt ) .or. oRpt:oDevice:hDC == 0
      return nil
   endif

   for n = 1 to FCount()
      oRpt:AddColumn( TrColumn():New( { FInfo1( cAlias, n ) },, ;
                                      { FInfo2( cAlias, n ) },,,,,,,,,, oRpt ) )
   next

   ENDREPORT

   ACTIVATE REPORT oRpt

   DBGOTO( nRecnum )

   return nil

// ******************************************************************************************************
static function FInfo1( cAlias, n )
   return { || ( cAlias ) ->( FieldName( n ) ) }
// ******************************************************************************************************
static function FInfo2( cAlias, n )
   return { || ( cAlias ) ->( FieldGet( n ) ) }
Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)
Posts: 56
Joined: Wed May 23, 2007 02:01 PM

Creating a Report from a ListBox

Posted: Fri Jul 06, 2007 10:40 AM

hi Ollie,

the message box is empty because your app don't find prev32.dll ...

regards

Yury Marcelino Al
yury030575@yahoo.com.br
vimansca@vimansca.com.br
Leme / SP - Brasil
Posts: 233
Joined: Sat Dec 30, 2006 06:10 AM

Creating a Report from a ListBox

Posted: Fri Jul 06, 2007 10:49 AM

Ah. Thanks!

Many thanks

Ollie.



Using:

xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6406)

Borland C++ 5.5.1

FWH 9.04 (2009 Apr)

Continue the discussion