Problem with report/preview (SOLVED)

Problem with report/preview (SOLVED)

Postby ADutheil » Sun Dec 02, 2012 1:51 pm

Preview is not printing if report is only one page long.
Code: Select all  Expand view

#include "FiveWin.ch"
#include "report.ch"

#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>

HB_FUNC( FREELIBRARY )
{
   hb_retl( FreeLibrary( ( HMODULE ) hb_parnl( 1 ) ) );
}

HB_FUNC( LOADLIBRARY )
{
   hb_retnl( ( HB_LONG ) LoadLibrary( ( char * ) hb_parc( 1 ) ) );
}

HB_FUNC( XFREEPROC )
{
}
#pragma ENDDUMP

STATIC oReport
STATIC oWnd   := NIL

FUNCTION Main
LOCAL oBar      := NIL

set( 11, "on" )
set( 5, 1930 )
set( 4, if(__SetCentury(), "dd/mm/yyyy", "dd/mm/yy") )
setKey( VK_ESCAPE, { || NIL } )
SetBalloon( .T. )
SetCenterOnParent( .T. )
SET _3DLOOK ON
DEFINE WINDOW oWnd TITLE "TESTE REPORT " MDI MENU BuildMenu()
ACTIVATE WINDOW oWnd
RETURN ( NIL )

STATIC FUNCTION BuildMenu
LOCAL oMenu := NIL

MENU oMenu 2010
        MENUITEM "Relatório"   BLOCK { || Rep01() }
ENDMENU
RETURN ( oMenu )


Function Rep01()

     USE TEST

     REPORT oReport TITLE  "*** My First Report ***" PREVIEW

     COLUMN TITLE "St"         DATA Test->State
     COLUMN TITLE "First Name" DATA Test->First
     COLUMN TITLE "   Salary"  DATA Test->Salary

     END REPORT

     ACTIVATE REPORT oReport FOR age > 50

     CLOSE TEST

RETURN NIL
 


If I take the "FOR age > 50" condition off the report it is 2 pages long and print button opens the print selection dialog. With the "FOR age > 50" condition the report is half page long and nothing happens when clicking the print button.
Tested with fwh 1204 and fwh 1209 msvc10 and mingw.
Anybody already faced this?

---------------------------------------
Just solved by setting a default printer.
Regards,

André Dutheil
FWH 13.04 + HB 3.2 + MSVS 10
ADutheil
 
Posts: 368
Joined: Sun May 31, 2009 6:25 pm
Location: Salvador - Bahia - Brazil

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 117 guests