FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour RPreview más reciente
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 06:38 AM

Armando,

alinares@fivetechsoft.com

gracias :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 12:15 PM

Antonio

Enviado, ojalá pronto tengamos excelentes noticias.

Saludos

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 05:27 PM
Armando,

Recibido, gracias :-)

Basándome en la idea y en parte del código usado por Manuel, lo he implementado en la forma que entiendo más simple y que no requiere de muchos cambios en la apariencia a la que los usuarios estan acostumbrados. Va incluido en FWH 13.07.



Nuevos métodos en la Clase TPreview: PrintersMenu() y SelPrinter( cPrinter )

En rpreview.prg hacer estos cambios:

Code (fw): Select all Collapse
      DEFINE TBMENU OF oBar ;
         ACTION  If( ValType( ::bPrint ) == 'B', Eval( ::bPrint, Self ), ::PrintPage() ) ;
         TOOLTIP Strtran( TXT_PRINT, "&", "" ) ;
         MESSAGE TXT_PRINT_CURRENT_PAGE ;
         MENU    ::PrintersMenu()

      /*
      DEFINE TBBUTTON OF oBar ;
         ACTION  If( ValType( ::bPrint ) == 'B', Eval( ::bPrint, Self ), ::PrintPage() ) ;
         TOOLTIP Strtran( TXT_PRINT, "&", "" ) ;
         MESSAGE TXT_PRINT_CURRENT_PAGE ;
         MENU    ::PrintersMenu()
      */


Code (fw): Select all Collapse
      DEFINE BUTTON RESOURCE "Printer2" OF oBar GROUP ;
         MENU ::PrintersMenu() ;
         MESSAGE TXT_PRINT_CURRENT_PAGE            ;
         ACTION  If( ValType( ::bPrint ) == 'B', Eval( ::bPrint, Self ), ::PrintPage() ) ;
         TOOLTIP Strtran( TXT_PRINT, "&", "" )


Code (fw): Select all Collapse
METHOD SelPrinter( cPrinter ) CLASS TPreview

   local cOldPrinter := GetProfString( "windows", "device" , "" )

   WriteProfString( "windows", "device", cPrinter )
   SysRefresh()
   PrinterInit()

   DeleteDC( ::oDevice:hDC )

   ::oDevice:hDC    = GetPrintDefault( GetActiveWindow() )
   ::oDevice:cModel = cPrinter
    
   SysRefresh()
   WriteProfString( "windows", "device", cPrinter )

RETURN nil


Code (fw): Select all Collapse
METHOD PrintersMenu() CLASS TPreview

   local oPop, aPrinters := aGetPrinters()

   MENU oPop POPUP
      oPop:l2007 = ( nStyle == 2007 )
      oPop:l2010 = ( nStyle == 2010 )

      AEval( aPrinters, { | cPrinter | MenuAddItem( cPrinter,,;
             cPrinter $ ::oDevice:cModel,,;
             { | oMenuItem | ::SelPrinter( oMenuItem:cPrompt ) } ) } )
   ENDMENU

return oPop
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 05:52 PM

Maestro,

Por favor, ¿podrías añadir exportar a Excel?.

¿Y poner un icono más moderno de Word por favor?.

Asimismo, el guardar a PDF debería tener su propio Icono autónomo.

También, para quedar de 10, falta enviar por email en pdf, con DEFINE MAIL.

Muy agradecida.

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 05:53 PM
Antonio, no se podría poner también el número de páginas totales del informe?
Por lo menos en mi versión no aparece.
Code (fw): Select all Collapse
         @ 7, nCol SAY ::oPage PROMPT TXT_PAGENUM + ":  "+;
              LTrim( Str( ::nPage, 4, 0 ) ) + " / " + ;    // " de "
              LTrim( Str( Len( ::oDevice:aMeta ) ) ) ;
              SIZE 180, 15 PIXEL OF ::oBar FONT ::oFont


Saludos
Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 05:58 PM
Cristobal,

Aqui aparece bien el número total de páginas:

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 06:01 PM

Para exportar a Excel:

//--------------------------------------------------------------------------------------------------
FUNCTION RPreviewExportarExcel( oReport )

LOCAL oError

TRY

oReport:ToExcel()

CATCH oError

MsgStop("ERROR: No ha sido posible exportar a Excel"+CRLF+CRLF+"Subsistema: "+oError:Subsystem+CRLF+"Operación: "+oError:Operation+CRLF+"Descripción: "+oError:Description, " E R R O R ")

END

RETURN NIL
//--------------------------------------------------------------------------------------------------

Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 06:02 PM

DEFINE TBBUTTON OF oBar ;
ACTION RPreviewExportarExcel( oReport ) ;
TOOLTIP "Exportar a Excel" ;
MESSAGE "Exporta a formato Excel" ;
WHEN oReport != NIl

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 06:05 PM

Gracias
Entonces es mi version
Lo he dicho por la imagen que has puesto antes
Saludos

Cristobal Navarro

Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo

El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 06:16 PM
Elvira,

Que imagen propones para el icono de Word ? Creo que esta es la más reciente pero es demasiada compleja para un bitmap de 16x16 que es el tamaño que nosotros usamos:



En cuanto a las otras mejoras que comentas, estamos en ello y las publicaremos pronto :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 3358
Joined: Fri Oct 07, 2005 08:20 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 06:19 PM

Antonio:

Excelente, más rápido que una pizza :D , voy a hacer los cambios.

Elvira, para cambiar el icono puedes hacerlo editando el Prev32.Dll.

Saludos

SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 06:26 PM

Elvira,

gracias! :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 06:50 PM
Antonio,

Te adjunto nuestro .dll:
http://uploaded.net/file/jqtnoyc3

Igualmente, me gustaría sugerirte que la Barra fuese una Ribbon Bar look 2010 o, al menos, una Rebar como tenemos nosotros ahora, y se ve bastante bonito:


Muchas gracias.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 07:13 PM

Elvira,

gracias a ti por tus sugerencias y aportaciones que estas haciendo :-)

Si nos guiamos por la estética de Windows 8, la actual toolbar que usa FWH se ve más "plana" que una rebar. La tendencia es eliminar degradados en superficies pequeñas y que se vean "planas".

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 518
Joined: Fri Jun 29, 2012 12:49 PM
Re: RPreview más reciente
Posted: Sat Jul 20, 2013 07:22 PM

Maestro,

Gracias a vosotros por vuestra inestimable ayuda y atención.

A mi el look del preview actual me recuerda a Windows 3.1

Quizás con una Ribbon clause 2013 o una barra con otros colores pudiera ser.

;)