Creating a Report from a ListBox

Creating a Report from a ListBox

Postby Ollie » Fri Jul 06, 2007 9:13 am

This code gives a MsgYesNo Box with nothing in it.

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

Where is the problem?

Code: Select all  Expand view  RUN
#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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am

Postby yury » 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
yury
 
Posts: 56
Joined: Wed May 23, 2007 2:01 pm

Postby Ollie » 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)
Ollie
 
Posts: 233
Joined: Sat Dec 30, 2006 6:10 am


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 40 guests