Page 1 of 1

RUNTIME error on line: ACTIVATE REPORT oRpt

Posted: Thu Jan 11, 2007 10:52 am
by Ollie
I get a RUNTIME error on line: ACTIVATE REPORT oRpt

Error description: Error FiveWin/3 Cannot create Dialog Box:
Resource: PREVIEW_PROC

I've tried code right out of BROWSE.PRG in SOURCE -

What am I missing?

Code: Select all

STATIC PROCEDURE lookup_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

Posted: Thu Jan 11, 2007 11:39 am
by Antonio Linares
Ollie,

You need to copy FWH\DLL\prev32.dll to the same place where your app is

Posted: Thu Jan 11, 2007 12:01 pm
by Ollie
Thanks that worked.