"YES" - gives an error
"NO" - does nothing
Where is the problem?
- Code: Select all Expand view
#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 ) ) }