FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Asignar bPrint de Tpreview
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Asignar bPrint de Tpreview
Posted:

If you want the replacement globally for the entire application, then the best place is in the beginning of the program in function main().

RPreview():bPrint := <block>

If you want only for a single report, anytime before activating the report:

RPreview():bPrint := <block>
After printing the report
RPreview():bPrint := nil

Regards



G. N. Rao.

Hyderabad, India
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Asignar bPrint de Tpreview
Posted: Thu Aug 15, 2013 05:34 PM

Quiero personalizar el dialogo del Preview para dejarlo con el mismo look que el resto del programa . La opción correcta es usar el nuevo codeblock que se ha creado para tal efecto como ClassData bPrint . Pero :
¿ como es la forma mas correcta de asignarlo ? , ¿ Añadiendo código a La función Rpreview() ? . ¿ que otras soluciones mas elegantes aconsejais ? .
Gracias por vuestras respuestas .

Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: Asignar bPrint de Tpreview
Posted: Fri Aug 16, 2013 04:27 AM

Purpose of bPrint is to enable you have your own dialog.
You need to write a function which replaces Method PrintPage(), in your style. Within the function, you can use all methods and data of TPreview.

bPrint := { |oRep| MyPrintPage( oRep ) }

function MyPrintPage( Self )

<here write your function as if you are replacing method PrintPage() >

return nil

Regards



G. N. Rao.

Hyderabad, India
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: Asignar bPrint de Tpreview
Posted: Fri Aug 16, 2013 07:36 AM
nageswaragunupudi wrote:Purpose of bPrint is to enable you have your own dialog.
You need to write a function which replaces Method PrintPage(), in your style. Within the function, you can use all methods and data of TPreview.

bPrint := { |oRep| MyPrintPage( oRep ) }

function MyPrintPage( Self )

<here write your function as if you are replacing method PrintPage() >

return nil


Right, but the question is where is the right place to assign the codeblock ? In the RPreview modified function ?
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: Asignar bPrint de Tpreview
Posted: Fri Aug 16, 2013 01:34 PM
nageswaragunupudi wrote:If you want the replacement globally for the entire application, then the best place is in the beginning of the program in function main().

RPreview():bPrint := <block>
l

Exactly this was looking. Thank you very much for the help

Continue the discussion