topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
---|---|
press BUTTON Key ? | Hi Antonio Linares
Always thanks it gives too much in the reply which is kind. |
press BUTTON Key ? | Hi Antonio Linares
See this portion ( FUNC test_button(n) )
The contents of the 'oField[n]:cCapture' does not change.
Also neither the 'oField[n]:SetColor( CLR_WHITE, CLR_YELLOW )' Changes
When it is done how.
It is kind to a question always and answer back, it gives and the unit only it is grateful.
[code:5vl1whkd]
#define CR chr(13)
Function main()
publ oWnd, oField := array(250), count := 1
DEFINE WINDOW oWnd
for i := 1 to 50
for j := 1 to 5
cCap := CR + " " + CR + alltrim(tran(n,"999"))+" used"
@ (i*15), (j*30) BUTTONBMP oField[count] PROMPT cCap OF oWnd SIZE 10, 10 PIXEL
oField[count]:nStyle := nOr( oField[count]:nStyle, 8192 )
oField[count]:bAction := GenBlock( count )
count += 1
next
next
ACTIVATE WINDOW oWnd
return nil
//------------------------------------------------
func GenBlock( n )
RETU { || test_button( n ) }
//------------------------------------------------
FUNC test_button(n)
oField[n]:cCaption := CR + "Not" + CR + alltrim(tran(n,"999"))+ CR + " used"
oField[n]:SetColor( CLR_WHITE, CLR_YELLOW )
oField[n]:Refresh()
RETU NIL
[/code:5vl1whkd] |
press BUTTON Key ? | Here you have a working sample:
[code:29of9bh0]
#include "FiveWin.ch"
#define CR chr(13)
Function main()
publ oWnd, oField := array(250), count := 1
DEFINE WINDOW oWnd
for i := 1 to 50
for j := 1 to 5
cCap := alltrim(tran(count,"999"))+" used"
@ (i*26), (j*75) BTNBMP oField[count] PROMPT cCap OF oWnd SIZE 70, 24 PIXEL
oField[count]:nStyle := nOr( oField[count]:nStyle, 8192 )
oField[count]:bAction := GenBlock( count )
count += 1
next
next
ACTIVATE WINDOW oWnd
return nil
//------------------------------------------------
func GenBlock( n )
RETU { || test_button( n ) }
//------------------------------------------------
FUNC test_button(n)
oField[n]:SetText( "Not " + alltrim(tran(n,"999")) + " used" )
oField[n]:SetColor( CLR_RED, CLR_YELLOW )
oField[n]:Refresh()
RETU NIL
[/code:29of9bh0]
[url=http://imageshack.us:29of9bh0][img:29of9bh0]http://img526.imageshack.us/img526/7360/buttonsqp8.png[/img:29of9bh0][/url:29of9bh0] |
press BUTTON Key ? | Hi Antonio Linares
Why the execution is not.
[code:3mk2xf8d]
#include "FiveWin.ch"
#define CR chr(13)
Function main()
publ oWnd, oField := array(250), count := 1 , oFont
DEFINE FONT oFont NAME GetSysFont() SIZE 0, -8
DEFINE WINDOW oWnd
for i := 1 to 50
for j := 1 to 5
@ (i*26), (j*75) BITMAP oField[count] FILENAME "test.bmp" NOBORDER SIZE 70, 24 OF oWnd ADJUST PIXEL
oField[count]:bPainted := { |hDC| OnPaint( hDC, str(count, 3), oFont ) ) }
oField[count]:bLClicked := GenBlock(count)
count += 1
next
next
ACTIVATE WINDOW oWnd
oFont:End()
return nil
//------------------------------------------------
func GenBlock( n )
RETU { || test_button( n ) }
//------------------------------------------------
FUNC OnPaint( hDC, cMsg, oFont )
local hOldFont
hOldFont := SelectObject( hDC, oFont:hFont )
SetBkMode( hDC, TRANSPARENT )
TextOut( hDC, 5, 5, cMsg )
SelectObject( hDC, hOldFont )
RETU NILl
//------------------------------------------------
FUNC test_button(n)
msginfo(n)
RETU NIL
[/code:3mk2xf8d] |
press some button btnbmp | I must make a reservation for a group of people .
they want some tables
I wish select some tables ( I made it with btnbmp see please this <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=22092">viewtopic.php?f=3&t=22092</a><!-- l --> )
and when I click on each btnbmp must be pressed
to save the numbers of those tables for create the reservation
sample
group 1 tables 54,53,52,51
group 2 table 23,24
each btnbmp I assign a action with aBtn[n]:bAction := {|oBtn| Menu_actions( oBtn,oFree,oPanel) }
any solution ? |
presupuesto para un Control | Hola.
Me gustaría solicitar un presupuesto para un control.
Estoy interesado en un control similar a esto: <!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=21772&hilit=AUTOGET">viewtopic.php?f=3&t=21772&hilit=AUTOGET</a><!-- l -->
Se debe trabajar como [url:3036j5ew]http://jqueryui.com/demos/autocomplete/#default[/url:3036j5ew]
Yo puede indicar una matriz o el campo de la DBF.
Cualquiera que esté interesado en su desarrollo por favor envíeme una cita en ukservice.software @ gmail.com
Muchas gracias.
Saludos cordiales, |
prev32.dll not found!!! | Saludos Amigos del Foro y FELIZ AÑO 2012.-
Estoy usando la ultima version de FWH y me dice en un obrw:report()
que no consigue prev32.dll y el mismo esta en el directorio donde esta el .exe
Gracias de Antemano a todos. |
prev32.dll para FiveWin 2.7 en español | A ver si alguien sabe y medice donde puedo encontrar una prev32.dll para FWH 2.7 en español, la que tengo vieja en WinXp no muestra los iconos, y la nueva que me han mnadado con FWH 2.7 está en inglés.
Gracias |
prev32.dll para FiveWin 2.7 en español | Julio,
Aquí la tienes:
<!-- m --><a class="postlink" href="http://hyperupload.com/download/0186065f14/prev32sp.dll.html">http://hyperupload.com/download/0186065 ... p.dll.html</a><!-- m -->
Ya la hemos añadido al setup de FWH para futuros builds. Gracias. |
prev32.dll para FiveWin 2.7 en español | Muchas gracias Antonio |
prevenir corrupción | Buen día,Tengo intención de que, al iniciar una aplicación, "revise" las .DBF, los .CDX y los .FPT y, si hay algún error en las .CDX, inicie un proceso de reindexado. Aunque no me ha pasado con las CDX, tengo entendido que los índices son lo que presentan problemas.¿Que puedo usar para comprobar el estado de estos archivos?. Gracias.Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> FWH 2.7 + xHarbour |
prevenir corrupción | [code:2x4c7x2u]
#Include "Fivewin.Ch"
REQUEST OrdKeyNo, OrdKeyCount, OrdKeyGoto
FUNCTION VENTAS()
LOCAL DbClientes
IF NetUse( "CLIENTES", .T. )
OrdListAdd( "Clientes", "CODIGO" )
DATABASE DbClientes
DbClientes:Load()
DbClientes:SetBuffer( .T. )
ELSE
MsgStop( "Banco de Dados Bloqueado", "Cuidado!" )
RETURN NIL
ENDIF
IF ORDKEYCOUNT() != RECCOUNT()
VERIFY_CDX( "Clientes" ) //-> Banco de datos: CLIENTES.DBF
Endif
...
...
RETURN NIL
//
STATIC FUNCTION VERIFY_CDX( XARCHIVO )
MsgStop( ( "Tu mensageria aqui... " ), "avisa personas" )
DbCLoseAll()
REINDEXAR() //-> Funcion de indexacion...
DbCLoseAll()
QUIT
RETURN NIL
[/code:2x4c7x2u]Saludos |
prevenir corrupción | Gracias João,No conzco algunas funciones pero imagino lo que hacen y lo voy a poner en práctica.Saludos.Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
prevenir corrupción | Hola Rolando,La función OrdKeyCount() solo verifica que haya tantas claves como registros haya en la tabla. Esa condición no se cumple en los casos en que tienes alguna condición FOR para el índice, por ejemplo FOR !Deleted().Tampoco te avisará si, por ejemplo, alguien cambia alguno de los campos claves sin abrir el índice.Hasta donde sé, no existe una forma práctica de verificar la integridad, ya que para estar seguro habría que regenerar todas las claves y ver de que estén correctamente indexadas, lo que sería más pesado que reindexar de nuevo.Te recomiendo que sigas los consejos del manual de Clipper para Redes: SIEMPRE, pero SIEMPRE, un COMMIT antes de UNLOCK.Asegurarte de que los usuarios salen correctamente del programa, y deja alguna señal para detectar una salida anómala. En caso de detectar que un programa abortó, sugiere al usuario reindexar como medida preventiva.Con eso te puedo decir que no tengo problemas importantes.Un saludo,Carlos. |
prevenir corrupción | Carlos, puedes probar la clave tanbien:[code:1oysebhf]
SET ORDER TO 4
IF INDEXKEY() # "COD+DTOC(EMISION)" .AND. LEFT(xARCHIVO,8) = "CLIENTES"
REINDEXAR()
ENDIF
[/code:1oysebhf]Una ideaSaludos |
prevenir corrupción | Joao,como comentaba antes, lo que se verifica es muy superficial, y estamos atacando el problema cuando ya ha sucedido. Por eso le recomendaba al compañero que toma algunos recaudos que son de carácter preventivo, que son más efectivos que tratar de intuir cuando estan bien o nó los datos, lo que es prácticamente imposible hacerlo con un alto grado de seguridad.Un saludo,Carlos. |
prevenir corrupción | [quote="Carlos Mora":23th7a21]Joao,
como comentaba antes, lo que se verifica es muy superficial, y estamos atacando el problema cuando ya ha sucedido. Por eso le recomendaba al compañero que toma algunos recaudos que son de carácter preventivo, que son más efectivos que tratar de intuir cuando estan bien o nó los datos, lo que es prácticamente imposible hacerlo con un alto grado de seguridad.
Un saludo,
Carlos.[/quote:23th7a21]Carlos, como haces entonces??Cual és tu sugerencia via codigo??Tiene algo escrito, por favor? Ideas nuevas, és siempre bienvenidas.Gracias,Regards, saludos. |
prevenir corrupción | Joao,Lee mi primer post. Mis sugerencias estan ahí, yo no verifico la integridad de los índices, no hay formas prácticas de asegurar que un índice esta desactualizado, y las verificaciones que tu haces cubren muy pocas de las muchas posibilidades de corrupción o desincronización. NO PONGO CODIGO porque como te reitero ESE CODIGO NO EXISTE. imagina un indice de una base de 1000 registros (pequeña). ¿Como puedes asegurar que todas las claves del índice se corresponden con su registro? Solo yendo registro por registro, generando la clave y comparándola. Eso es más costoso que reconstruir el indice, por lo tanto NO TIENE SENTIDO.Mejor que eso es prevenir, eliminando los orígenes de las posibles corrupciones, con las dos recomendaciones que ya hice. El código esta en el manual del Clipper 5.2, y creeme, funciona.Carlos. |
prevenir corrupción | [quote="Carlos Mora":2s4fltgz]Joao,
Lee mi primer post. Mis sugerencias estan ahí, yo no verifico la integridad de los índices, no hay formas prácticas de asegurar que un índice esta desactualizado, y las verificaciones que tu haces cubren muy pocas de las muchas posibilidades de corrupción o desincronización. NO PONGO CODIGO porque como te reitero ESE CODIGO NO EXISTE.
imagina un indice de una base de 1000 registros (pequeña). ¿Como puedes asegurar que todas las claves del índice se corresponden con su registro? Solo yendo registro por registro, generando la clave y comparándola. Eso es más costoso que reconstruir el indice, por lo tanto NO TIENE SENTIDO.
Mejor que eso es prevenir, eliminando los orígenes de las posibles corrupciones, con las dos recomendaciones que ya hice. El código esta en el manual del Clipper 5.2, y creeme, funciona.
Carlos.[/quote:2s4fltgz]Gracias, Carlos.Saludos. |
prevenir corrupción | Gracias por los aportes.SaludosRolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> |
preview | Como puedo hacer para que el preview salga en primer plano? Antes con fwh 2.6 salía así, pero con la version 7.12 , se posiciona en la pantalla principal, bajo el diálogo. Lo que hice fue iconizar el diálogo, pero no sé como hacer para maximizarlos hasta que no imprima ó salga del preview.
Es decir puedo interactuar con el preview para que cuando imprima o salga de él ( odlg:normal()).
Gracias |
preview | Solucionado, la explicación estaba en los foros.
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=14167&p=72958&hilit=preview#p72958">viewtopic.php?f=6&t=14167&p=72958&hilit=preview#p72958</a><!-- l -->
Gracias |
preview alpha 2 | Holas,
sigo con el preview a paso de tortuga pero seguimos,
- se añadio la visualizacion para orientacion horizontal
- El zoom funciona con la visualizacion de dos paginas
- se añadio el goto a la pagina deseada
[img:2tjvw7p3]http://img109.imageshack.us/img109/7671/pantalla1y.jpg[/img:2tjvw7p3]
pueden bajar la version binaria de
[url:2tjvw7p3]http://www.box.net/shared/mmxnpv19a5[/url:2tjvw7p3]
No he podido hacer que se marque el listview cuando se cambia de pagina, habria que extender la clase, para poder manipular mejor este componente, haber si alguien tiene tiempo y puede ver este tema, que completaria la implementacion de este preview
saludos
Marcelo |
preview alpha 2 | Holas,
I am slow but still working
- add visualization in landscape
- the zoom work with two page preview
- add got to any page
[img:2rikia2b]http://img109.imageshack.us/img109/7671/pantalla1y.jpg[/img:2rikia2b]
you can donwload from
[url:2rikia2b]http://www.box.net/shared/mmxnpv19a5[/url:2rikia2b]
I can't do that listview work marking the selected page, I think would be necesary to extend the listview class, to imporve the manage of the component, if somebody has time and see this topic, which complete the preview develop.
saludos
Marcelo |
preview alpha 2 | Marcelo,
On Xmas I sent you my modifications for 2/4/6/8/10 pages ( Multipages) , do you saw this and implemeted on your preview ? |
preview alpha 2 | Espectacular AMIGO....
Como sujerencia es Agregar en la barra superior poder seleccionar la Impresora.
y un Amigo realizó la modificacion que el zoom en ves de hacerlo por Factor es hacerlo por porcentaje.
Pasame tu correo para enviarte la Clase con esto implementado.
Saludos.
David
Argentina
#include "FiveWin.ch"
#define DEVICE oWnd:cargo
#define GO_POS 0
#define GO_UP 1
#define GO_DOWN 2
#define GO_LEFT 1
#define GO_RIGHT 2
#define GO_PAGE .T.
#define VSCROLL_RANGE 20 * ::nZFactor
#define HSCROLL_RANGE 20 * ::nZFactor
#define TXT_FIRST LoadString( GetResources(), 07 )
#define TXT_PREVIOUS LoadString( GetResources(), 08 )
#define TXT_NEXT LoadString( GetResources(), 09 )
#define TXT_LAST LoadString( GetResources(), 10 )
#define TXT_ZOOM LoadString( GetResources(), 11 )
#define TXT_UNZOOM LoadString( GetResources(), 12 )
#define TXT_TWOPAGES LoadString( GetResources(), 13 )
#define TXT_ONEPAGE LoadString( GetResources(), 14 )
#define TXT_PRINT LoadString( GetResources(), 15 )
#define TXT_EXIT LoadString( GetResources(), 16 )
#define TXT_FILE LoadString( GetResources(), 17 )
#define TXT_PAGE LoadString( GetResources(), 18 )
#define TXT_PREVIEW LoadString( GetResources(), 03 )
#define TXT_PAGENUM LoadString( GetResources(), 19 )
#define TXT_A_WINDOW_PREVIEW_IS_ALLREADY_RUNNING ;
LoadString( GetResources(), 20 )
#define TXT_GOTO_FIRST_PAGE ;
LoadString( GetResources(), 21 )
#define TXT_GOTO_PREVIOUS_PAGE ;
LoadString( GetResources(), 22 )
#define TXT_GOTO_NEXT_PAGE ;
LoadString( GetResources(), 23 )
#define TXT_GOTO_LAST_PAGE ;
LoadString( GetResources(), 24 )
#define TXT_ZOOM_THE_PREVIEW ;
LoadString( GetResources(), 25 )
#define TXT_UNZOOM_THE_PREVIEW ;
LoadString( GetResources(), 26 )
#define TXT_PREVIEW_ON_TWO_PAGES ;
LoadString( GetResources(), 27 )
#define TXT_PREVIEW_ON_ONE_PAGE ;
LoadString( GetResources(), 28 )
#define TXT_PRINT_CURRENT_PAGE ;
LoadString( GetResources(), 29 )
#define TXT_EXIT_PREVIEW ;
LoadString( GetResources(), 30 )
#define TXT_FACTOR ;
LoadString( GetResources(), 31 )
#define TXT_ZOOM_FACTOR ;
LoadString( GetResources(), 32 )
#define MK_MBUTTON 16
Static l2007 := .t.
Static oCbxPrn,oSayPrn
//----------------------------------------------------------------------------//
CLASS TPreview
DATA oWnd, oBar, oFont, oImageList
DATA oDevice
DATA oHand, oCursor
DATA oMeta1, oMeta2, oSay, oFactor
DATA oPage, oTwoPages, oZoom
DATA oMenuZoom, oMenuTwoPages, oMenuUnZoom, oMenuOnePage
DATA cResFile
DATA aFactor, nPage, nZFactor
DATA lTwoPages, lZoom, lExit
DATA cPageNum
// Esteban
DATA aPrinters
DATA cPrinter
DATA cOldPrinter
// Esteban
CLASSDATA oWndMain
METHOD New( oDevice )
METHOD Activate()
METHOD BuildButtonBar()
METHOD BuildWindow()
METHOD BuildMenu()
METHOD PaintMeta()
METHOD NextPage()
METHOD PrevPage()
METHOD TopPage()
METHOD BottomPage()
METHOD TwoPages( lMenu )
METHOD Zoom( lMenu )
METHOD VScroll( nType, lPage, nSteps )
METHOD HScroll( nType, lPage, nSteps )
METHOD SetOrg1( nX, nY )
METHOD SetOrg2( nX, nY )
METHOD CheckKey( nKey, nFlags )
METHOD CheckMouseWheel( nKeys, nDelta, nXPos, nYPos )
METHOD SetFactor( nValue )
METHOD PrintPage()
METHOD PrintPrv( oDlg, nOption, nPageIni, nPageEnd )
// Esteban
METHOD CambiaPrinter()
// Esteban
ENDCLASS
//----------------------------------------------------------------------------//
METHOD New( oDevice ) CLASS TPreview
if oDevice == nil
PRINTER oDevice PREVIEW
PAGE
ENDPAGE
MsgInfo( oDevice:aMeta[ 1 ] )
// ENDPRINTER
endif
::oDevice := oDevice
::nPage := 1
::nZFactor := 1
::lTwoPages := .F.
::lZoom := .F.
::lExit := .F.
// Esteban
::aPrinters := aGetPrinters()
::cPrinter := PrnGetName()
::cOldPrinter := ::cPrinter
// Esteban
::BuildWindow()
return Self
//----------------------------------------------------------------------------//
METHOD Activate() CLASS TPreview
ACTIVATE WINDOW ::oWnd MAXIMIZED ;
ON RESIZE ::PaintMeta() ;
ON UP ::VScroll( GO_UP ) ;
ON DOWN ::VScroll( GO_DOWN ) ;
ON PAGEUP ::VScroll( GO_UP, GO_PAGE) ;
ON PAGEDOWN ::VScroll( GO_DOWN, GO_PAGE) ;
ON LEFT ::HScroll( GO_LEFT ) ;
ON RIGHT ::HScroll( GO_RIGHT ) ;
ON PAGELEFT ::HScroll( GO_LEFT, GO_PAGE ) ;
ON PAGERIGHT ::HScroll( GO_RIGHT, GO_PAGE ) ;
VALID ( ::CambiaPrinter( ::cOldPrinter ),; // Esteban
::oWnd:oIcon := nil ,;
::oFont:End() ,;
::oMeta1:End() ,;
::oMeta2:End() ,;
::oDevice:End() ,;
::oHand:End() ,;
::oWnd := nil ,;
If( IsAppThemed() .and. ! l2007, ::oImageList:End(),),;
::lExit := .T. ,;
.T. )
if ::oDevice:lPrvModal
StopUntil( { || ::lExit } )
endif
return nil
//----------------------------------------------------------------------------//
METHOD BuildButtonBar() CLASS TPreview
local oImageList, oReBar, oBar, oHand, oWndMain
local l97Look := ::oWndMain != nil .and. ::oWndMain:oBar != nil .and. ;
Len( ::oWndMain:oBar:aControls ) > 0 .and. ;
::oWndMain:oBar:aControls[ 1 ]:l97Look
DEFINE CURSOR ::oHand HAND
if WndMain() != nil
if WndMain():oBar != nil
oBar = WndMain():oBar
if oBar != nil .and. Upper( oBar:ClassName() ) == "TBAR" .and. oBar:l2007
l2007 = .T.
endif
endif
endif
l2007 = .T.
if IsAppThemed() .and. ! l2007
DEFINE IMAGELIST oImageList SIZE 16, 16
oImageList:AddMasked( TBitmap():Define( "top2",, ::oWnd ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "previous2",, ::oWnd ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "next2",, ::oWnd ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "bottom2",, ::oWnd ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "zoom2",, ::oWnd ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "two_pages2",, ::oWnd ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "printer2",, ::oWnd ), nRGB( 255, 0, 255 ) )
oImageList:AddMasked( TBitmap():Define( "exit2",, ::oWnd ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "unzoom2",, ::oWnd ), nRGB( 192, 192, 192 ) )
oImageList:AddMasked( TBitmap():Define( "one_page2",, ::oWnd ), nRGB( 192, 192, 192 ) )
::oImageList = oImageList
oReBar = TReBar():New( ::oWnd )
DEFINE TOOLBAR oBar OF oReBar SIZE 25, 25 IMAGELIST oImageList
::oBar = oBar
oReBar:InsertBand( oBar )
oBar:nHeight -= 2
DEFINE TBBUTTON OF oBar ;
ACTION ::TopPage() ;
TOOLTIP Strtran( TXT_FIRST, "&", "" ) ;
MESSAGE TXT_GOTO_FIRST_PAGE
DEFINE TBBUTTON OF oBar ;
ACTION ::PrevPage() ;
TOOLTIP Strtran( TXT_PREVIOUS, "&", "" ) ;
MESSAGE TXT_GOTO_PREVIOUS_PAGE
DEFINE TBBUTTON OF oBar ;
ACTION ::NextPage() ;
TOOLTIP Strtran( TXT_NEXT, "&", "" ) ;
MESSAGE TXT_GOTO_NEXT_PAGE
DEFINE TBBUTTON OF oBar ;
ACTION ::BottomPage() ;
TOOLTIP Strtran( TXT_LAST, "&", "" ) ;
MESSAGE TXT_GOTO_LAST_PAGE
DEFINE TBSEPARATOR OF oBar
DEFINE TBBUTTON OF oBar ;
ACTION ::Zoom() ;
TOOLTIP Strtran( TXT_ZOOM, "&", "" ) ;
MESSAGE TXT_ZOOM_THE_PREVIEW
DEFINE TBBUTTON OF oBar ;
ACTION ::TwoPages() ;
TOOLTIP StrTran( Strtran( TXT_TWOPAGES, "&", "" ), "á", "a" ) ;
MESSAGE TXT_PREVIEW_ON_TWO_PAGES
DEFINE TBSEPARATOR OF oBar
DEFINE TBBUTTON OF oBar ;
ACTION ::PrintPage() ;
TOOLTIP Strtran(TXT_PRINT,"&","") ;
MESSAGE TXT_PRINT_CURRENT_PAGE
DEFINE TBSEPARATOR OF oBar
DEFINE TBBUTTON OF oBar ;
ACTION ::oWnd:End() ;
TOOLTIP Strtran( TXT_EXIT, "&", "" ) ;
MESSAGE TXT_EXIT_PREVIEW
else
if oBar != nil .and. oBar:l2007
DEFINE BUTTONBAR oBar SIZE 26, If( LargeFonts(), 30, 26 ) OF ::oWnd 2007
oBar:bPainted = { || oBar:Say( 7, 285, "Factor:",,, ::oFont, .T., .T. ),;
If( Len( ::oDevice:aMeta ) > 1,;
oBar:Say( 7, 380, ::cPageNum + LTrim( Str( ::nPage, 4, 0 ) ) + " / " + ;
LTrim( Str( Len( ::oDevice:aMeta ) ) ),,, ::oFont, .T., .T. ),;
oBar:Say( 7, 380, ::cPageNum + LTrim( Str( ::nPage, 4, 0 ) ),;
,,, ::oFont, .T., .T. ) ) }
else
DEFINE BUTTONBAR oBar _3D SIZE 26, If( LargeFonts(), 34, 30 ) OF ::oWnd 2007
endif
::oBar = oBar
if l97Look
DEFINE BUTTON RESOURCE "Top" OF oBar ;
MESSAGE TXT_GOTO_FIRST_PAGE ;
ACTION ::TopPage() ;
TOOLTIP Strtran( TXT_FIRST, "&", "" ) NOBORDER
DEFINE BUTTON RESOURCE "Previous" OF oBar ;
MESSAGE TXT_GOTO_PREVIOUS_PAGE ;
ACTION ::PrevPage() ;
TOOLTIP Strtran( TXT_PREVIOUS, "&", "" ) NOBORDER
DEFINE BUTTON RESOURCE "Next" OF oBar ;
MESSAGE TXT_GOTO_NEXT_PAGE ;
ACTION ::NextPage() ;
TOOLTIP Strtran( TXT_NEXT, "&", "" ) NOBORDER
DEFINE BUTTON RESOURCE "Bottom" OF oBar ;
MESSAGE TXT_GOTO_LAST_PAGE ;
ACTION ::BottomPage() ;
TOOLTIP Strtran( TXT_LAST, "&", "" ) NOBORDER
DEFINE BUTTON ::oZoom RESOURCE "Zoom" OF oBar GROUP ;
MESSAGE TXT_ZOOM_THE_PREVIEW ;
ACTION ::Zoom() ;
TOOLTIP Strtran( TXT_ZOOM, "&", "" ) NOBORDER
DEFINE BUTTON ::oTwoPages RESOURCE "Two_Pages" OF oBar ;
MESSAGE TXT_PREVIEW_ON_TWO_PAGES ;
ACTION ::TwoPages() ;
TOOLTIP Strtran( TXT_TWOPAGES, "&", "" ) NOBORDER
DEFINE BUTTON RESOURCE "Printer" OF oBar GROUP ;
MESSAGE TXT_PRINT_CURRENT_PAGE ;
ACTION ::PrintPage() ;
TOOLTIP Strtran( TXT_PRINT, "&", "" ) NOBORDER
DEFINE BUTTON RESOURCE "Exit" OF oBar GROUP ;
MESSAGE TXT_EXIT_PREVIEW ;
ACTION ::oWnd:End() ;
TOOLTIP Strtran( TXT_EXIT, "&", "" ) NOBORDER
else
DEFINE BUTTON RESOURCE "Top2" OF oBar ;
MESSAGE TXT_GOTO_FIRST_PAGE ;
ACTION ::TopPage() ;
TOOLTIP Strtran( TXT_FIRST, "&", "" )
DEFINE BUTTON RESOURCE "Previous2" OF oBar ;
MESSAGE TXT_GOTO_PREVIOUS_PAGE ;
ACTION ::PrevPage() ;
TOOLTIP Strtran( TXT_PREVIOUS, "&", "" )
DEFINE BUTTON RESOURCE "Next2" OF oBar ;
MESSAGE TXT_GOTO_NEXT_PAGE ;
ACTION ::NextPage() ;
TOOLTIP Strtran( TXT_NEXT, "&", "" )
DEFINE BUTTON RESOURCE "Bottom2" OF oBar ;
MESSAGE TXT_GOTO_LAST_PAGE ;
ACTION ::BottomPage() ;
TOOLTIP Strtran( TXT_LAST, "&", "" )
DEFINE BUTTON ::oZoom RESOURCE "Zoom2" OF oBar GROUP ;
MESSAGE TXT_ZOOM_THE_PREVIEW ;
ACTION ::Zoom() ;
TOOLTIP Strtran( TXT_ZOOM, "&", "" )
DEFINE BUTTON ::oTwoPages RESOURCE "Two_Pages2" OF oBar ;
MESSAGE TXT_PREVIEW_ON_TWO_PAGES ;
ACTION ::TwoPages() ;
TOOLTIP Strtran( TXT_TWOPAGES, "&", "" )
DEFINE BUTTON RESOURCE "Printer2" OF oBar GROUP ;
MESSAGE TXT_PRINT_CURRENT_PAGE ;
ACTION ::PrintPage() ;
TOOLTIP Strtran( TXT_PRINT, "&", "" )
DEFINE BUTTON RESOURCE "Exit2" OF oBar GROUP ;
MESSAGE TXT_EXIT_PREVIEW ;
ACTION ::oWnd:End() ;
TOOLTIP Strtran( TXT_EXIT, "&", "" )
endif
AEval( oBar:aControls, { | o | o:oCursor := ::oHand } )
endif
return nil
//----------------------------------------------------------------------------//
METHOD BuildWindow() CLASS TPreview
local oIcon, cTitle := "FiveWin Printing Preview", oCursor
local hOldRes := GetResources(), oThis := Self
local cPrinter
DEFAULT ::oWndMain := WndMain()
#ifdef __CLIPPER__
::cResFile := "Preview.dll"
#else
if ! IsWin64()
::cResFile := "Prev32.dll"
else
::cResFile = "Prev64.dll"
endif
#endif
if SetResources( ::cResFile ) < 32
MsgStop( ::cResFile + " not found, imposible to continue",;
"FiveWin Printing Error" )
return nil
endif
if ::oDevice != nil
cTitle = ::oDevice:cDocument
endif
if ::oWndMain != nil
oIcon = ::oWndMain:oIcon
else
DEFINE ICON oIcon RESOURCE "Print"
endif
DEFINE FONT ::oFont NAME GetSysFont() SIZE 0, -12
if ::oWndMain != nil .and. Upper( ::oWndMain:ClassName() ) == "TMDIFRAME"
DEFINE WINDOW ::oWnd ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL MDICHILD
else
DEFINE WINDOW ::oWnd FROM 0, 0 TO 24, 80 ;
TITLE cTitle ;
COLOR CLR_BLACK,CLR_LIGHTGRAY ;
ICON oIcon ;
VSCROLL HSCROLL MENU ::BuildMenu()
endif
::oWnd:SetFont( ::oFont )
::oWnd:oVScroll:SetRange( 0, 0 )
::oWnd:oHScroll:SetRange( 0, 0 )
::cPageNum = TXT_PAGENUM
::BuildButtonBar()
#ifdef __CLIPPER__
SET MESSAGE OF ::oWnd TO TXT_PREVIEW+" generada el día: "+DTOC(DATE())+" a las: "+TIME();
TIME DATE KEYBOARD //NOINSET
#else
if l2007
SET MESSAGE OF ::oWnd TO TXT_PREVIEW+" generada el día: "+DTOC(DATE())+" a las: "+TIME() 2007
::oWnd:oMsgBar:KeybOn()
::oWnd:oMsgBar:ClockOn()
::oWnd:oMsgBar:DateOn()
else
DEFINE STATUSBAR OF ::oWnd PROMPT " " + TXT_PREVIEW+" generada el día: "+DTOC(DATE())+" a las: "+TIME()
endif
#endif
::oMeta1 := TMetaFile():New( 0, 0, 0, 0,;
::oDevice:aMeta[ 1 ],;
::oWnd,;
CLR_BLACK,;
CLR_WHITE,;
::oDevice:nHorzRes(),;
::oDevice:nVertRes() )
DEFINE CURSOR ::oCursor RESOURCE "Lupa"
::oMeta1:oCursor := ::oCursor
::oMeta1:blDblClick := { | nRow, nCol, nKeyFlags | ;
::SetOrg1( nCol, nRow, nKeyFlags ) }
::oMeta1:bKeyDown := { | nKey, nFlags | ::CheckKey( nKey, nFlags ) }
::oMeta1:bMouseWheel := { | nKeys, nDelta, nXPos, nYPos | ;
::CheckMouseWheel( nKeys, nDelta, nXPos, nYPos ) }
#ifndef __XPP__ // XBPP bug. Warning: don't change this into #ifdef __CLIPPER__
::oMeta2 := TMetaFile():New( 0, 0, 0, 0, "",;
::oWnd, CLR_BLACK, CLR_WHITE, ::oDevice:nHorzRes(),;
::oDevice:nVertRes() )
#else
::oMeta2 := TMetaFile():New():_New( 0, 0, 0, 0, "",;
::oWnd, CLR_BLACK, CLR_WHITE, ::oDevice:nHorzRes(),;
::oDevice:nVertRes() )
#endif
::oMeta2:oCursor = ::oCursor
::oMeta2:blDblClick := { | nRow, nCol, nKeyFlags | ;
::SetOrg2( nCol, nRow, nKeyFlags ) }
::oMeta2:hide()
::SetFactor()
if ! l2007
@ 7, 285 SAY ::oSay PROMPT "Factor:" ;
SIZE 45, 15 PIXEL OF ::oBar FONT ::oFont
::oSay:lTransparent = .T.
endif
@ 3, 250 COMBOBOX ::oFactor VAR ::nZFactor ;
ITEMS { "100 %", "110 %", "120 %", "130 %", "140 %", "150 %", "160 %", "170 %", "180 %", "190 %", "200 %" } ;
OF ::oBar FONT ::oFont PIXEL SIZE 65,200 ;
ON CHANGE oThis:SetFactor( oThis:nZFactor )
if ! l2007 .OR. l2007
if Len( ::oDevice:aMeta ) > 1 //TXT_PAGENUM
@ 7, 330 SAY ::oPage PROMPT "Número de página: " + LTrim( Str( ::nPage, 4, 0 ) ) + " / " + ;
LTrim( Str( Len( ::oDevice:aMeta ) ) ) ;
SIZE 140, 15 PIXEL OF ::oBar FONT ::oFont;
COLOR RGB(0,0,0),RGB(215,227,242)
else //TXT_PAGENUM
@ 7, 330 SAY ::oPage PROMPT "Número de página: " + LTrim( Str( ::nPage, 4, 0 ) );
SIZE 140, 15 PIXEL OF ::oBar FONT ::oFont;
COLOR RGB(0,0,0),RGB(215,227,242)
endif
::oPage:lTransparent = .T.
endif
// Esteban
@ 007 , 480 SAY oSayPrn PROMPT "Cambiar impresora de salida" SIZE 180, 15 PIXEL OF ::oBar;
FONT ::oFont;
COLOR RGB(0,0,0),RGB(215,227,242)
@ 4.95, 620 COMBOBOX oCbxPrn;
VAR oThis:cPrinter;
PROMPTS oThis:aPrinters;
OF ::oBar;
FONT ::oFont;
PIXEL;
SIZE 250, 250;
ON CHANGE oThis:CambiaPrinter( oThis:cPrinter )
// Esteban
if IsAppThemed() .or. l2007
FixSays( ::oBar:hWnd )
endif
#ifndef __XPP__
::oFactor:Set3dLook()
#endif
SetResources( hOldRes )
::oWnd:oHScroll:bPos := { | nPos | ::HScroll( GO_POS, .f., nPos ) }
::oWnd:oVScroll:bPos := { | nPos | ::VScroll( GO_POS, .f., nPos ) }
return nil
//----------------------------------------------------------------------------//
METHOD CambiaPrinter( cOption ) CLASS TPreview // Esteban
Local cPrinter
cPrinter := GetProfString( "windows", "device" , "" )
WriteProfString( "windows", "device", cOption )
SysRefresh()
PrinterInit()
::oDevice:hDC := GetPrintDefault( GetActiveWindow() )
SysRefresh()
WriteProfString( "windows", "device", cPrinter )
RETURN nil
//----------------------------------------------------------------------------//
METHOD BuildMenu() CLASS TPreview
local nFor, oMenu
local lThemed := IsAppThemed()
local cPrinter := If( lThemed, "Printer2", "Printer" )
local cTop := If( lThemed, "Top2", "Top" )
local cPrevious := If( lThemed, "Previous2", "Previous" )
local cNext := If( lThemed, "Next2", "Next" )
local cBottom := If( lThemed, "Bottom2", "Bottom" )
local cZoom := If( lThemed, "Zoom2", "Zoom" )
local cUnZoom := If( lThemed, "UnZoom2", "UnZoom" )
local cOne_Page := If( lThemed, "One_page2", "One_page" )
local cTwo_Pages := If( lThemed, "Two_pages2", "Two_pages" )
local cExit := If( lThemed, "Exit2", "Exit" )
::aFactor := Array( 9 )
MENU oMenu 2007
MENUITEM TXT_FILE
MENU
MENUITEM TXT_PRINT ACTION ::PrintPage() ;
MESSAGE TXT_PRINT_CURRENT_PAGE RESOURCE cPrinter
SEPARATOR
MENUITEM TXT_EXIT ACTION ::oWnd:End() ;
MESSAGE TXT_EXIT_PREVIEW RESOURCE cExit
ENDMENU
MENUITEM TXT_PAGE
MENU
MENUITEM TXT_FIRST ACTION ::TopPage() ;
MESSAGE TXT_GOTO_FIRST_PAGE RESOURCE cTop
MENUITEM TXT_PREVIOUS ACTION ::PrevPage() ;
MESSAGE TXT_GOTO_PREVIOUS_PAGE RESOURCE cPrevious
MENUITEM TXT_NEXT ACTION ::NextPage() ;
MESSAGE TXT_GOTO_NEXT_PAGE RESOURCE cNext
MENUITEM TXT_LAST ACTION ::BottomPage() ;
MESSAGE TXT_GOTO_LAST_PAGE RESOURCE cBottom
SEPARATOR
MENUITEM ::oMenuZoom PROMPT TXT_ZOOM ACTION ::Zoom( .T. ) ;
MESSAGE TXT_ZOOM_THE_PREVIEW RESOURCE cZoom
MENUITEM ::oMenuUnZoom PROMPT TXT_UNZOOM ACTION ::Zoom( .T. ) ;
MESSAGE TXT_UNZOOM_THE_PREVIEW RESOURCE cUnZoom
MENUITEM "&Factor" MESSAGE TXT_ZOOM_FACTOR
MENU
FOR nFor := 1 to Len( ::aFactor )
MENUITEM ::aFactor[ nFor ] ;
PROMPT "&" + LTrim( Str( nFor ) ) ;
MESSAGE "Factor " + LTrim( Str( nFor ) ) ;
ACTION ( ::oFactor:Set( oMenuItem:nHelpId ),;
Eval( ::oFactor:bChange ) )
NEXT
ENDMENU
SEPARATOR
MENUITEM ::oMenuTwoPages PROMPT TXT_TWOPAGES ACTION ::TwoPages( .T. ) ;
ENABLED ;
MESSAGE TXT_PREVIEW_ON_TWO_PAGES RESOURCE cTwo_Pages
MENUITEM ::oMenuOnePage PROMPT TXT_ONEPAGE ACTION ::TwoPages(.T.) ;
MESSAGE TXT_PREVIEW_ON_ONE_PAGE RESOURCE cOne_Page
ENDMENU
ENDMENU
::oMenuUnZoom:Disable()
::oMenuOnePage:Disable()
return oMenu
//----------------------------------------------------------------------------//
METHOD PaintMeta() CLASS TPreview
local oCoors1, oCoors2
local aFiles := ::oDevice:aMeta // DEVICE
local nWidth, nHeight, nFactor, nMetaWidth
if ::oWnd != nil .and. IsIconic( ::oWnd:hWnd )
return nil
endif
do case
case ! ::lTwoPages
if ! ::lZoom
if ::oDevice:nHorzSize() >= ; // landscape (apaisado) // DEVICE
::oDevice:nVertSize()
nFactor := .8 // .4
else
nFactor := .40 // .25
endif
else
nFactor := .47
endif
if ::oWnd != nil
nWidth = ::oWnd:nWidth() - If( ::lZoom, 20, 0 )
nHeight = ::oWnd:nHeight() - If( ::lZoom .and. ::nZFactor > 1, 20, 0 ) - 10 - ;
If( LargeFonts(), 100, 80 )
if ! ::lZoom
nMetaWidth = ( nHeight - 40 ) * nFactor
else
nMetaWidth = nWidth * nFactor
endif
oCoors1 := TRect():New( 40,;
Max( ( nWidth / 2 ) - nMetaWidth, 10 ),;
nHeight,;
Min( ( nWidth / 2 ) + nMetaWidth, nWidth - 20 ) )
::oMeta2:Hide()
::oMeta1:SetCoors( oCoors1 )
::oMeta1:Refresh()
endif
case ::lTwoPages
nFactor := .4
aFiles := ::oDevice:aMeta // DEVICE
nWidth := ::oWnd:nWidth()
nHeight := ::oWnd:nHeight() - 10 - If( LargeFonts(), 100, 80 )
nMetaWidth = Min( ( nHeight - 40 ) * nFactor, ( nWidth - 60 ) / 4 )
oCoors1 := TRect():New( 40,;
( nWidth / 4 ) - nMetaWidth,;
nHeight,;
( nWidth / 4 ) + nMetaWidth )
oCoors2 := TRect():New( 40,;
( nWidth / 4 ) - nMetaWidth + ( nWidth / 2 ),;
nHeight,;
( nWidth / 4 ) + nMetaWidth + ( nWidth / 2 ) )
if ::nPage == Len( aFiles )
::oMeta2:SetFile( "" )
else
::oMeta2:SetFile( aFiles[ ::nPage + 1 ] )
endif
::oMeta1:SetCoors( oCoors1 )
::oMeta2:SetCoors( oCoors2 )
::oMeta1:Refresh()
::oMeta2:Show()
endcase
::oMeta1:SetFocus()
return nil
//----------------------------------------------------------------------------//
METHOD NextPage() CLASS TPreview
local hOldRes := GetResources()
local aFiles := ::oDevice:aMeta // DEVICE
if ::nPage >= Len( aFiles )
MsgBeep()
return nil
endif
::nPage++
SET RESOURCES TO ::cResFile
::oMeta1:SetFile( aFiles[ ::nPage ] )
if ! l2007
::oPage:SetText( TXT_PAGENUM + LTrim( Str( ::nPage, 4, 0 ) ) + " / " + ;
LTrim( Str( Len( aFiles ) ) ) )
endif
::oBar:Refresh()
::oMeta1:Refresh()
if ::lTwoPages
if Len( aFiles ) >= ::nPage + 1
::oMeta2:SetFile( aFiles[ ::nPage + 1 ] )
else
::oMeta2:SetFile( "" )
endif
::oMeta2:Refresh()
endif
::oMeta1:SetFocus()
SetResources( hOldRes )
return nil
//----------------------------------------------------------------------------//
METHOD PrevPage() CLASS TPreview
local hOldRes := GetResources()
local aFiles := ::oDevice:aMeta // DEVICE
if ::nPage == 1
MsgBeep()
return nil
endif
::nPage--
SET RESOURCES TO ::cResFile
::oMeta1:SetFile( aFiles[ ::nPage ] )
if ! l2007
::oPage:SetText( TXT_PAGENUM + LTrim( Str( ::nPage, 4, 0 ) ) + " / " + ;
LTrim( Str( Len( aFiles ) ) ) )
endif
::oBar:Refresh()
::oMeta1:Refresh()
if ::lTwoPages
if Len( aFiles ) >= ::nPage + 1
::oMeta2:SetFile( aFiles[ ::nPage + 1 ] )
else
::oMeta2:SetFile( "" )
endif
::oMeta2:Refresh()
endif
::oMeta1:SetFocus()
SetResources( hOldRes )
return nil
//----------------------------------------------------------------------------//
METHOD TopPage() CLASS TPreview
local hOldRes := GetResources()
local aFiles := ::oDevice:aMeta // DEVICE
if ::nPage == 1
MsgBeep()
return nil
endif
::nPage = 1
SET RESOURCES TO ::cResFile
::oMeta1:SetFile( aFiles[ ::nPage ] )
if ! l2007
::oPage:SetText( TXT_PAGENUM + LTrim( Str( ::nPage, 4, 0 ) ) + " / " + ;
LTrim( Str( Len( aFiles ) ) ) )
endif
::oBar:Refresh()
::oMeta1:Refresh()
if ::lTwoPages
if Len( aFiles ) >= ::nPage + 1
::oMeta2:SetFile( aFiles[ ::nPage + 1 ] )
else
::oMeta2:SetFile( "" )
endif
::oMeta2:Refresh()
endif
::oMeta1:SetFocus()
SetResources( hOldRes )
return nil
//----------------------------------------------------------------------------//
METHOD BottomPage() CLASS TPreview
local hOldRes := GetResources()
local aFiles := ::oDevice:aMeta // DEVICE
if ::nPage == Len( aFiles )
MsgBeep()
return nil
endif
::nPage = Len( aFiles )
SET RESOURCES TO ::cResFile
::oMeta1:SetFile( aFiles[ ::nPage ] )
if ! l2007
::oPage:SetText( TXT_PAGENUM + LTrim( Str( ::nPage, 4, 0 ) ) + " / " + ;
LTrim( Str( Len( aFiles ) ) ) )
endif
::oBar:Refresh()
::oMeta1:Refresh()
if ::lTwoPages
::oMeta2:SetFile( "" )
::oMeta2:Refresh()
endif
::oMeta1:SetFocus()
SetResources( hOldRes )
return nil
//----------------------------------------------------------------------------//
METHOD TwoPages( lMenu ) CLASS TPreview
local hOldRes := GetResources()
SET RESOURCES TO ::cResFile
DEFAULT lMenu := .F.
::lTwoPages := ! ::lTwoPages
if ::lTwoPages
if Len( ::oDevice:aMeta) == 1 // solo hay una pagina // DEVICE
::lTwoPages := ! ::lTwoPages
MsgBeep()
SetResources( hOldRes )
return nil
endif
if ::oDevice:nHorzSize() >= ; // Apaisado // DEVICE
::oDevice:nVertSize() // DEVICE
::lTwoPages := ! ::lTwoPages
MsgBeep()
SetResources( hOldRes )
return nil
endif
if ::lZoom
::Zoom( .T. )
endif
if ! IsAppThemed() .or. Upper( ::oBar:ClassName() ) == "TBAR"
::oTwoPages:FreeBitmaps()
::oTwoPages:LoadBitmaps( "One_Page2" )
::oTwoPages:cMsg := TXT_PREVIEW_ON_ONE_PAGE
::oTwoPages:cTooltip := StrTran( TXT_ONEPAGE, "&", "" )
else
::oBar:ChangeBitmap( 6, 10 )
::oBar:SetTooltip( 6, StrTran( TXT_ONEPAGE, "&", "" ) )
::oBar:SetMessage( 6, TXT_PREVIEW_ON_ONE_PAGE )
endif
if ::oWnd:oMenu != nil
::oMenuTwoPages:Disable()
::oMenuOnePage:Enable()
endif
else
if ! IsAppThemed() .or. Upper( ::oBar:ClassName() ) == "TBAR"
::oTwoPages:FreeBitmaps()
::oTwoPages:LoadBitmaps( "Two_Pages2" )
::oTwoPages:cMsg := TXT_PREVIEW_ON_TWO_PAGES
::oTwoPages:cTooltip := StrTran( TXT_TWOPAGES, "&", "" )
else
::oBar:ChangeBitmap( 6, 6 )
::oBar:SetTooltip( 6, StrTran( TXT_TWOPAGES, "&", "" ) )
::oBar:SetMessage( 6, TXT_PREVIEW_ON_TWO_PAGES )
endif
if ::oWnd:oMenu != nil
::oMenuTwoPages:Enable()
::oMenuOnePage:Disable()
endif
endif
if lMenu .and. ! IsAppThemed()
::oTwoPages:Refresh()
endif
::oWnd:Refresh()
::PaintMeta()
SetResources( hOldRes )
return nil
//----------------------------------------------------------------------------//
METHOD Zoom( lMenu ) CLASS TPreview
local hOldRes := GetResources()
SET RESOURCES TO ::cResFile
DEFAULT lMenu := .F.
::lZoom := ! ::lZoom
if ::lZoom
if ::lTwoPages
::TwoPages( .T. )
endif
if ! IsAppThemed() .or. l2007
::oZoom:FreeBitmaps()
::oZoom:LoadBitmaps( "Unzoom2" )
::oZoom:cMsg := TXT_UNZOOM_THE_PREVIEW
::oZoom:cTooltip := StrTran( TXT_UNZOOM, "&", "" )
else
::oBar:ChangeBitmap( 5, 9 )
::oBar:SetTooltip( 5, StrTran( TXT_UNZOOM, "&", "" ) )
::oBar:SetMessage( 5, TXT_UNZOOM_THE_PREVIEW )
endif
if ::oWnd:oMenu != nil
::oMenuZoom:Disable()
::oMenuUnZoom:Enable()
endif
::oWnd:oVScroll:SetRange( 1, VSCROLL_RANGE )
if ::nZFactor > 1
::oWnd:oHScroll:SetRange( 1, HSCROLL_RANGE )
endif
::oMeta1:ZoomIn()
else
if ! IsAppThemed() .or. l2007
::oZoom:FreeBitmaps()
::oZoom:LoadBitmaps( "Zoom2" )
::oZoom:cMsg := TXT_ZOOM_THE_PREVIEW
::oZoom:cTooltip := StrTran( TXT_ZOOM, "&", "" )
else
::oBar:ChangeBitmap( 5, 5 )
::oBar:SetTooltip( 5, StrTran( TXT_ZOOM, "&", "" ) )
::oBar:SetMessage( 5, TXT_ZOOM_THE_PREVIEW )
endif
if ::oWnd:oMenu != nil
::oMenuZoom:Enable()
::oMenuUnZoom:Disable()
endif
::oWnd:oVScroll:SetRange( 0, 0 )
::oWnd:oHScroll:SetRange( 0, 0 )
::oMeta1:ZoomOut()
::nZFactor = 1
if ::oWnd:oMenu != nil
AEval( ::aFactor, { | val, elem | val:SetCheck( ( elem == 1 ) ) } )
endif
::oFactor:Set( 1 )
endif
if lMenu .and. ! IsAppThemed()
::oZoom:Refresh()
endif
::PaintMeta()
SetResources( hOldRes )
return nil
//----------------------------------------------------------------------------//
METHOD VScroll( nType, lPage, nSteps ) CLASS TPreview
local nYfactor, nYorig, nStep
DEFAULT lPage := .F.
if nType == GO_UP
if ::oWnd:oVScroll:GetPos() <= ::oWnd:oVScroll:nMin
return nil
endif
else
if ::oWnd:oVScroll:GetPos() > ::oWnd:oVScroll:nMax
return nil
endif
endif
nYfactor := Int( ::oDevice:nVertRes() / ::oWnd:oVScroll:nMax ) // DEVICE
if nSteps != nil
nStep := nSteps
elseif lPage
nStep := ::oWnd:oVScroll:nMax / 10
else
nStep := 1
endif
if nType == GO_UP
nStep := -nStep
elseif nType == GO_POS
::oWnd:oVscroll:SetPos( nSteps )
nStep := 0
endif
nYorig := nYfactor * ( ::oWnd:oVScroll:GetPos() + nStep - 1 )
if nYorig > ::oDevice:nVertRes() // DEVICE
nYorig := ::oDevice:nVertRes() // DEVICE
endif
if nYorig < 0
nYorig := 0
endif
#ifdef __CLIPPER__
::oMeta1:SetOrg( nil, nYorig )
#else
::oMeta1:SetOrg( nil, nYorig / ::oDevice:nVertRes() * 10 ) // DEVICE
#endif
::oMeta1:Refresh()
return nil
//----------------------------------------------------------------------------//
METHOD HScroll( nType, lPage, nSteps ) CLASS TPreview
local nXfactor, nXorig, nStep
DEFAULT lPage := .F.
if nType == GO_UP
if ::oWnd:oHScroll:GetPos() <= ::oWnd:oHScroll:nMin
return nil
endif
else
if ::oWnd:oHScroll:GetPos() > ::oWnd:oHScroll:nMax
return nil
endif
endif
nXfactor := Int( ::oDevice:nHorzRes() / ::oWnd:oHScroll:nMax ) // DEVICE
if nSteps != nil
nStep := nSteps
elseif lPage
nStep := ::oWnd:oHScroll:nMax/10
else
nStep := 1
endif
if nType == GO_LEFT
nStep := -nStep
elseif nType == GO_POS
::oWnd:oHscroll:SetPos( nSteps )
nStep := 0
endif
nXorig := nXfactor * ( ::oWnd:oHScroll:GetPos() + nStep - 1 )
if nXorig > ::oDevice:nHorzRes() // DEVICE
nXorig := ::oDevice:nHorzRes() // DEVICE
endif
if nXorig < 0
nXorig := 0
endif
#ifdef __CLIPPER__
::oMeta1:SetOrg( nXorig, nil )
#else
::oMeta1:SetOrg( nXorig / ::oDevice:nHorzRes() * 10, nil ) // DEVICE
#endif
::oMeta1:Refresh()
return nil
//----------------------------------------------------------------------------//
METHOD SetOrg1( nX, nY ) CLASS TPreview
local oCoors
local nXStep, nYStep, nXFactor, nYFactor,;
nWidth, nHeight, nXOrg
if ::lZoom
::Zoom( .T. )
return nil
endif
oCoors := ::oMeta1:GetRect()
nWidth := oCoors:nRight - oCoors:nLeft + 1
nHeight := oCoors:nBottom - oCoors:nTop + 1
if .f.
nXStep := Max( Int( nX / nWidth * HSCROLL_RANGE ) - 9, 0 )
nXFactor := Int( ::oDevice:nHorzRes() / HSCROLL_RANGE ) // DEVICE
endif
if .f.
nYStep := Max( Int( nY / nHeight * VSCROLL_RANGE ) - 9, 0 )
nYFactor := Int( ::oDevice:nVertRes() / VSCROLL_RANGE ) // DEVICE
endif
::Zoom( .T. )
if ! Empty( nXStep )
::HScroll( 2,, nxStep )
::oWnd:oHScroll:SetPos( nxStep )
endif
if ! Empty( nYStep )
::VScroll( 2,, nyStep )
::oWnd:oVScroll:SetPos( nyStep )
endif
return nil
//----------------------------------------------------------------------------//
METHOD SetOrg2( nX, nY ) CLASS TPreview
local oCoors
local aFiles
local nXStep, nYStep, nXFactor, nYFactor,;
nWidth, nHeight, nXOrg
if ::oMeta2:cCaption == ""
return nil
endif
if ::lZoom
::Zoom( .T. )
return nil
endif
oCoors := ::oMeta2:GetRect()
nWidth := oCoors:nRight - oCoors:nLeft + 1
nHeight := oCoors:nBottom - oCoors:nTop + 1
if .f.
nXStep := Max( Int( nX / nWidth * HSCROLL_RANGE ) - 9, 0 )
nXFactor := Int( ::oDevice:nHorzRes() / HSCROLL_RANGE )
endif
if .f.
nYStep := Max( Int( nY / nHeight * VSCROLL_RANGE ) - 9, 0 )
nYFactor := Int( ::oDevice:nVertRes() / VSCROLL_RANGE ) // DEVICE
endif
::oMeta1:SetFile( ::oMeta2:cCaption )
aFiles := ::oDevice:aMeta // DEVICE
if ::nPage = Len( aFiles )
::oMeta2:SetFile( "" )
else
::oMeta2:SetFile( aFiles[ ++::nPage ] )
endif
//::oPage:Refresh()
::Zoom( .T. )
if ! Empty( nXStep )
::HScroll( 2,, nxStep )
::oWnd:oHScroll:SetPos( nxStep )
endif
if ! Empty( nYStep )
::VScroll( 2,, nyStep )
::oWnd:oVScroll:SetPos( nyStep )
endif
return nil
//----------------------------------------------------------------------------//
METHOD CheckKey( nKey, nFlags ) CLASS TPreview
if ! ::lZoom
do case
case nKey == VK_HOME
::TopPage()
case nKey == VK_END
::BottomPage()
case nKey == VK_PRIOR
::PrevPage()
case nKey == VK_NEXT
::NextPage()
endcase
else
do case
case nKey == VK_UP
::oWnd:oVScroll:GoUp()
case nKey == VK_PRIOR
::oWnd:oVScroll:PageUp()
case nKey == VK_DOWN
::oWnd:oVScroll:GoDown()
case nKey == VK_NEXT
::oWnd:oVScroll:PageDown()
case nKey == VK_LEFT
::oWnd:oHScroll:GoUp()
case nKey == VK_RIGHT
if ::oWnd:oHScroll != nil .and. ::oWnd:oHScroll:nMax > 0
::oWnd:oHScroll:GoDown()
endif
case nKey == VK_HOME
::oWnd:oVScroll:GoTop()
::oWnd:oHScroll:GoTop()
::oMeta1:SetOrg( 0, 0 )
::oMeta1:Refresh()
case nKey == VK_END
::oWnd:oVScroll:GoBottom()
::oWnd:oHScroll:GoBottom()
::oMeta1:SetOrg( .8 * ::oDevice:nHorzRes(), .8 * ::oDevice:nVertRes() ) // DEVICE
::oMeta1:Refresh()
endcase
endif
return nil
//----------------------------------------------------------------------------//
METHOD CheckMouseWheel( nKeys, nDelta, nXPos, nYPos ) CLASS TPreview
if ! ::lZoom
if lAnd( nKeys, MK_MBUTTON )
if nDelta > 0
::TopPage()
else
::BottomPage()
endif
else
if nDelta > 0
::PrevPage()
else
::NextPage()
endif
endif
else
if lAnd( nKeys, MK_MBUTTON )
if nDelta > 0
if ::oWnd:oVScroll:GetPos() > ::oWnd:oVScroll:nMin
::oWnd:oVScroll:PageUp()
endif
else
if ::oWnd:oVScroll:GetPos() < ::oWnd:oVScroll:nMax
::oWnd:oVScroll:PageDown()
endif
endif
else
if nDelta > 0
if ::oWnd:oVScroll:GetPos() > ::oWnd:oVScroll:nMin
::oWnd:oVScroll:GoUp()
endif
else
if ::oWnd:oVScroll:GetPos() < ::oWnd:oVScroll:nMax
::oWnd:oVScroll:GoDown()
endif
endif
endif
endif
return nil
//----------------------------------------------------------------------------//
METHOD SetFactor( nValue ) CLASS TPreview
local lInit := .F.
if nValue == nil .and. ::oWnd:oMenu != nil
AEval( ::aFactor, { | v, e | v:nHelpId := e } )
nValue := ::nZFactor
lInit := .T.
endif
if ::oWnd:oMenu != nil
AEval( ::aFactor, { | val, elem | val:SetCheck( elem == nValue ) } )
endif
//::oMeta1:SetZoomFactor( ::nZFactor, ::nZFactor * 2 )
// AGREGADO OJEDA ESTEBAN 25-08-2009
DO CASE
CASE ::nZFactor = 1
::oMeta1:SetZoomFactor( ::nZFactor, ::nZFactor * 2 )
CASE ::nZFactor = 2
::oMeta1:SetZoomFactor( 2 * 0.55 , 2 * 1.10 )
CASE ::nZFactor = 3
::oMeta1:SetZoomFactor( 2 * 0.60 , 2 * 1.20 )
CASE ::nZFactor = 4
::oMeta1:SetZoomFactor( 2 * 0.65 , 2 * 1.30 )
CASE ::nZFactor = 5
::oMeta1:SetZoomFactor( 2 * 0.70 , 2 * 1.40 )
CASE ::nZFactor = 6
::oMeta1:SetZoomFactor( 2 * 0.75 , 2 * 1.50 )
CASE ::nZFactor = 7
::oMeta1:SetZoomFactor( 2 * 0.80 , 2 * 1.60 )
CASE ::nZFactor = 8
::oMeta1:SetZoomFactor( 2 * 0.85 , 2 * 1.70 )
CASE ::nZFactor = 9
::oMeta1:SetZoomFactor( 2 * 0.90 , 2 * 1.80 )
CASE ::nZFactor = 10
::oMeta1:SetZoomFactor( 2 * 0.95 , 2 * 1.90 )
CASE ::nZFactor = 11
::oMeta1:SetZoomFactor( 2 * 1.00 , 2 * 2.00 )
ENDCASE
if ! ::lZoom .and. ! lInit
// ::Zoom( .T. ) A.L. 08 Oct 2007
endif
if ::lZoom
::oWnd:oVScroll:SetRange( 1, VSCROLL_RANGE )
if ::nZFactor > 1
::oWnd:oHScroll:SetRange( 1, HSCROLL_RANGE )
else
::oWnd:oHScroll:SetRange( 0, 0 )
endif
endif
::oMeta1:SetFocus()
return nil
//----------------------------------------------------------------------------//
METHOD PrintPage() CLASS TPreview
local hOldRes := GetResources()
local hMeta := ::oMeta1:hMeta
local oDlg, oRad, oPageIni, oPageFin
local nOption := 1, nFirst := 1, nLast := Len( ::oDevice:aMeta ) // DEVICE
local oThis := Self
if nLast == 1
::PrintPrv( nil, nOption, nFirst, nLast )
return nil
endif
SET RESOURCES TO ::cResFile
DEFINE DIALOG oDlg RESOURCE "PRINT"
REDEFINE BUTTON ID 101 OF oDlg ;
ACTION oThis:PrintPrv( oDlg, nOption, nFirst, nLast )
REDEFINE BUTTON ID 102 OF oDlg ACTION oDlg:End()
REDEFINE RADIO oRad VAR nOption ID 103, 104, 105 OF oDlg ;
ON CHANGE If( nOption==3 ,;
( oPageIni:Enable(), oPageFin:Enable() ),;
( oPageIni:Disable(), oPageFin:Disable() ) )
REDEFINE GET oPageIni ;
VAR nFirst ID 106 PICTURE "@K 99999" ;
VALID If( nFirst < 1 .or. nFirst > nLast, ( MsgBeep(), .F. ), .T. ) ;
OF oDlg
REDEFINE GET oPageFin ;
VAR nLast ID 107 PICTURE "@K 99999" ;
VALID If( nLast < nFirst .or. nLast > Len( ::oDevice:aMeta ), ; // DEVICE
( MsgBeep(),.F. ), .T.) OF oDlg
oPageIni:Disable()
oPageFin:Disable()
SetResources( hOldRes )
ACTIVATE DIALOG oDlg
return nil
//----------------------------------------------------------------------------//
METHOD PrintPrv( oDlg, nOption, nPageIni, nPageEnd ) CLASS TPreview
local oDevice := ::oDevice // DEVICE
local aFiles := oDevice:aMeta
local hMeta := ::oMeta1:hMeta
local nFor
CursorWait()
StartDoc( oDevice:hDC, oDevice:cDocument )
do case
case nOption == 1 // All
for nFor := 1 to Len( aFiles )
#ifdef __CLIPPER__
StartPage( oDevice:hDC )
hMeta := GetMetaFile( aFiles[ nFor ] )
PlayMetaFile( oDevice:hDC, hMeta )
DeleteMetafile( hMeta )
EndPage( oDevice:hDC )
#else
StartPage( oDevice:hDC )
hMeta := GetEnhMetaFile( aFiles[ nFor ] )
PlayEnhMetaFile( oDevice:hDC, hMeta,, .t. )
DeleteEnhMetafile( hMeta )
EndPage( oDevice:hDC )
#endif
next
case nOption == 2 // Current page
StartPage( oDevice:hDC )
hMeta := ::oMeta1:hMeta
#ifdef __CLIPPER__
PlayMetaFile( oDevice:hDC, hMeta )
#else
PlayEnhMetaFile( oDevice:hDC, hMeta,, .t. )
#endif
EndPage( oDevice:hDC )
case nOption == 3 // Range
for nFor := nPageIni to nPageEnd
StartPage( oDevice:hDC )
#ifdef __CLIPPER__
hMeta := GetMetaFile( aFiles[ nFor ] )
PlayMetaFile( oDevice:hDC, hMeta )
DeleteMetafile( hMeta )
#else
hMeta := GetEnhMetaFile( aFiles[ nFor ] )
PlayEnhMetaFile( oDevice:hDC, hMeta,, .t. )
DeleteEnhMetafile( hMeta )
#endif
EndPage( oDevice:hDC )
next
endcase
EndDoc( oDevice:hDC )
CursorArrow()
if oDlg != nil
oDlg:End()
endif
return nil
//----------------------------------------------------------------------------//
function RPreview( oDevice )
local oPreview := TPreview():New( oDevice )
oPreview:Activate()
return nil
//----------------------------------------------------------------------------//
#ifdef __CLIPPER__
static function IsAppThemed()
return .f.
static function TToolBar()
return nil
static function TRebar()
return nil
#endif
//----------------------------------------------------------------------------// |
preview alpha 2 | Hola David,
gracias, esta previsto el manejo del Zoom, solo que debo ver como manejar este, actualmente el zoom esta en funcion del tamaño de la venta, la idea es que sea independiente a ella, no importa que tamaño tenga la ventana del preview el zoom de la pagina se debe presentar con las mismas dimensiones.
Sobre la seleccion de la impresora, nunca hice la prueba de mandar a imprimir un EMF luego que este ha sido creado con un DC diferente, pero veremos como sale.
Bueno estoy trabajando poco a poco, en unas semanas tendre una vacacion asi que aprovechare para darle un poco mas de tiempo y mejorar el codigo para publicarlo.
saludos
Marcelo |
preview alpha 2 | Hi Silvio,
thanks, I have your code, but I didn't see it yet, I will check it when I finish the first version of the preview, then we can define the multipages properties together.
ciao
Marcelo
[quote="Silvio":7agyqk93]Marcelo,
On Xmas I sent you my modifications for 2/4/6/8/10 pages ( Multipages) , do you saw this and implemeted on your preview ?[/quote:7agyqk93] |
preview class modifier | can any body provide me of modified preview.dll that can print the whole fields of DBF avoiding the message : report is too big to fit in page . |
preview class modifier | There is nothing you can do to force a report to fit in the page other than reduce the amount of data of reduce the font.
I already answered to this question in the past, if I remember correctly.
EMG |
preview com fwh1204 (RESOLVIDO) | depois da atualizacao para fivewin 1204 o preview mostra assim:
[img:ywmx4mdm]http://oi48.tinypic.com/1y3ixk.jpg[/img:ywmx4mdm]
se compilo com aversao anteiro mostra correto
que tenho q fazer? |
preview com fwh1204 (RESOLVIDO) | Por favor muestra el código que usas para imprimir, gracias |
preview com fwh1204 (RESOLVIDO) | Antonio o codigo é esse abaixo:
[code=fw:jez6hnfv]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> DMPAPER_A4 <span style="color: #000000;">9</span> <span style="color: #B900B9;">// A4 210 x 297 mm</span><br /><br /><span style="color: #00C800;">Function</span> RPed06<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> oPrn, oFont1, oFont2, oFont3, oFont4, oPen4, nRecno := Pedm-><span style="color: #000000;">(</span>Recno<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,;<br /> nRowStep, nColStep, prow, pcol, cText, cLine, nFor, nLines,;<br /> Start := .t., TotalBru:=<span style="color: #000000;">0</span>, TotalLiq:=<span style="color: #000000;">0</span>, TotalDes:=<span style="color: #000000;">0</span>, TotalIpi:=<span style="color: #000000;">0</span>,;<br /> TotBru:=<span style="color: #000000;">0</span>, TotLiq:=<span style="color: #000000;">0</span>, TotDes:=<span style="color: #000000;">0</span>, TotIpi:=<span style="color: #000000;">0</span>, nQtd_Pedi:=<span style="color: #000000;">0</span>, nIten:=<span style="color: #000000;">0</span>, nPag:= <span style="color: #000000;">1</span><br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ESPELHO PEDIDO VENDA"</span> PREVIEW<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-08</span> <span style="color: #0000ff;">OF</span> oPrn<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont2 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-08</span> BOLD <span style="color: #0000ff;">OF</span> oPrn<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont3 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-07</span> <span style="color: #0000ff;">OF</span> oPrn<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont4 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-09</span> BOLD <span style="color: #0000ff;">OF</span> oPrn<br /> <span style="color: #0000ff;">DEFINE</span> PEN oPen4 WIDTH <span style="color: #000000;">3</span> <span style="color: #0000ff;">COLOR</span> <span style="color: #000000;">000000</span> <span style="color: #B900B9;">//3123123</span><br /><br /> oPrn:<span style="color: #000000;">SetPage</span><span style="color: #000000;">(</span>DMPAPER_A4<span style="color: #000000;">)</span><br /><br /> nRowStep = oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">60</span> <span style="color: #B900B9;">// We want 60 rows</span><br /> nColStep = oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">78</span> <span style="color: #B900B9;">// We want 78 cols</span><br /> prow:=nRowStep<br /> pcol:=nColStep<br /><br /> DbSelectArea<span style="color: #000000;">(</span><span style="color: #ff0000;">"Pedi"</span><span style="color: #000000;">)</span><br /> dbSetRelation<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Prod"</span>, <span style="color: #000000;">{</span>|| Pedi->Fam_Pedi+Pedi->Pro_Pedi<span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">PAGE</span><br /> CAJAROUND_<span style="color: #000000;">(</span><span style="color: #000000;">0.5</span>, <span style="color: #000000;">0.5</span>, <span style="color: #000000;">20.5</span>, <span style="color: #000000;">2.7</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span>, oPrn, oPen4<span style="color: #000000;">)</span><br /> CAJAROUND_<span style="color: #000000;">(</span><span style="color: #000000;">0.5</span>, <span style="color: #000000;">2.7</span>, <span style="color: #000000;">20.5</span>, <span style="color: #000000;">4.7</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span>, oPrn, oPen4<span style="color: #000000;">)</span><br /><span style="color: #B900B9;">// CAJAROUND_(0.5, 4.7, 20.5, 5.5, 150, 150, oPrn, oPen4)</span><br /> CAJAROUND_<span style="color: #000000;">(</span><span style="color: #000000;">0.5</span>, <span style="color: #000000;">24.7</span>, <span style="color: #000000;">20.5</span>, <span style="color: #000000;">28.5</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span>, oPrn, oPen4<span style="color: #000000;">)</span><br /><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"ESPELHO PEDIDO DE VENDA"</span>+Iif<span style="color: #000000;">(</span>Empr->Nem_Empr, <span style="color: #ff0000;">" - "</span>+Empr->Nom_Empr, <span style="color: #ff0000;">""</span><span style="color: #000000;">)</span>, oFont4<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, pcol*<span style="color: #000000;">57</span>, <span style="color: #ff0000;">"EM: "</span>+dtoc<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">' - '</span>+time<span style="color: #000000;">(</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">" PAG: "</span>+Alltrim<span style="color: #000000;">(</span>Str<span style="color: #000000;">(</span>nPag<span style="color: #000000;">)</span><span style="color: #000000;">)</span>, oFont2<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"PEDIDO: "</span>+Alltrim<span style="color: #000000;">(</span>Pedm->Cod_Pedm<span style="color: #000000;">)</span>+<span style="color: #ff0000;">"-"</span>+Pedm->Ser_Pedm+<span style="color: #ff0000;">" SIT: "</span>+Pedm->Sta_Pedm+<span style="color: #ff0000;">" "</span>+<span style="color: #ff0000;">" EMISSÃO: "</span>+DtoC<span style="color: #000000;">(</span>Pedm->Dat_Pedm<span style="color: #000000;">)</span>, oFont2<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"FORMA PAGM.: "</span>+Cond->Cod_Cond+<span style="color: #ff0000;">"-"</span>+Alltrim<span style="color: #000000;">(</span>Cond->Nom_Cond<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" REPR.: "</span>+Vend->Cod_Vend+<span style="color: #ff0000;">"-"</span>+Alltrim<span style="color: #000000;">(</span>Vend->APe_Vend<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" TRANSP.: "</span>+Tran->Cod_Tran+<span style="color: #ff0000;">"-"</span>+Tran->Nom_Tran, oFont2<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"CLIENTE: "</span>+Clie->Cod_Clie+<span style="color: #ff0000;">" - "</span>+Clie->Nom_Clie, oFont1<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"END.: "</span>+Alltrim<span style="color: #000000;">(</span>Clie->End_clie<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" "</span>+Alltrim<span style="color: #000000;">(</span>Clie->Nmr_clie<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" "</span>+Alltrim<span style="color: #000000;">(</span>Clie->Cmp_clie<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" "</span>+Clie->Bai_Clie+<span style="color: #ff0000;">"MUNICIPIO: "</span>+Alltrim<span style="color: #000000;">(</span>Clie->Cid_Clie<span style="color: #000000;">)</span>+<span style="color: #ff0000;">" - UF: "</span>+Clie->Est_Clie+<span style="color: #ff0000;">" C.E.P.: "</span>+Clie->Cep_Clie, oFont1<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, Iif<span style="color: #000000;">(</span>Clie->Pfj_Clie, <span style="color: #ff0000;">"CPF: "</span>,<span style="color: #ff0000;">"CNPJ: "</span><span style="color: #000000;">)</span>+Iif<span style="color: #000000;">(</span>Clie->Pfj_Clie, Clie->Cpf_Clie, Clie->Cgc_Clie<span style="color: #000000;">)</span>+Space<span style="color: #000000;">(</span><span style="color: #000000;">08</span><span style="color: #000000;">)</span>+Iif<span style="color: #000000;">(</span>Clie->Pfj_Clie, <span style="color: #ff0000;">"RG: "</span>, <span style="color: #ff0000;">"INS.EST.: "</span><span style="color: #000000;">)</span>+Iif<span style="color: #000000;">(</span>Clie->Pfj_Clie, Clie->Ide_Clie, Clie->Ins_Clie<span style="color: #000000;">)</span>, oFont1<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"ITEN GR-CÓD. DESCRIÇÃO PRODUTO"</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">043</span>, <span style="color: #ff0000;">"MD"</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">047</span>, <span style="color: #ff0000;">"QTD."</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">052</span>, <span style="color: #ff0000;">"PREÇO"</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">057</span>, <span style="color: #ff0000;">"DESC."</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">063</span>, <span style="color: #ff0000;">"IPI"</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">069</span>, <span style="color: #ff0000;">"TOTAL"</span>, oFont1<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> prow+=nRowStep<br /> Pedi-><span style="color: #000000;">(</span>DbSeek<span style="color: #000000;">(</span>Pedm->Cod_Pedm<span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">While</span> !Pedi-><span style="color: #000000;">(</span>Eof<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> .and. Pedi->Cod_Pedi = Pedm->Cod_Pedm<br /> TotBru = <span style="color: #000000;">(</span>Pedi->Qtd_Pedi*Pedi->Prc_Pedi<span style="color: #000000;">)</span><br /> TotDes = <span style="color: #000000;">(</span>pedi->qtd_Pedi*Pedi->Prc_Pedi*pedi->Des_Pedi/<span style="color: #000000;">100</span><span style="color: #000000;">)</span><br /> TotIpi = <span style="color: #000000;">(</span>Pedi->Qtd_Pedi*Pedi->Prc_Pedi*Pedi->Ipi_Pedi/<span style="color: #000000;">100</span><span style="color: #000000;">)</span>-<span style="color: #000000;">(</span><span style="color: #000000;">(</span>Pedi->Qtd_Pedi*Pedi->Prc_Pedi*Pedi->Ipi_Pedi/<span style="color: #000000;">100</span><span style="color: #000000;">)</span>*Pedi->Des_Pedi/<span style="color: #000000;">100</span><span style="color: #000000;">)</span><br /> TotLiq = TotBru - Totdes + TotIpi<br /> nIten=nIten<span style="color: #000000;">+1</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span>prow, PCol*<span style="color: #000000;">004</span>, StrZero<span style="color: #000000;">(</span>nIten,<span style="color: #000000;">2</span>,<span style="color: #000000;">0</span><span style="color: #000000;">)</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span>prow, PCol*<span style="color: #000000;">006</span>, Prod->Fam_Prod+<span style="color: #ff0000;">"-"</span>+Prod->Cod_Prod+<span style="color: #ff0000;">" "</span>+Prod->Nom_Prod, oFont3<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span>prow, PCol*<span style="color: #000000;">043</span>, Prod->Uni_Prod, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span>prow, PCol*<span style="color: #000000;">049</span>, Tran<span style="color: #000000;">(</span>Pedi->Qtd_Pedi,<span style="color: #ff0000;">"9999999"</span><span style="color: #000000;">)</span>, oFont1,,,, <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span>prow, PCol*<span style="color: #000000;">055</span>, Tran<span style="color: #000000;">(</span>Pedi->Prc_Pedi,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">)</span>, oFont1,,,, <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span>prow, PCol*<span style="color: #000000;">060</span>, Tran<span style="color: #000000;">(</span>TotDes,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">)</span>, oFont1,,,, <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span>prow, PCol*<span style="color: #000000;">065</span>, Tran<span style="color: #000000;">(</span>TotIpi,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">)</span>, oFont1,,,, <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span>prow, PCol*<span style="color: #000000;">072</span>, Tran<span style="color: #000000;">(</span>TotLiq,<span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">)</span>, oFont1,,,, <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> TotalBru = TotalBru + <span style="color: #000000;">(</span>Pedi->Qtd_Pedi*Pedi->Prc_Pedi<span style="color: #000000;">)</span><br /> TotalDes = TotalDes + <span style="color: #000000;">(</span>pedi->qtd_Pedi*Pedi->Prc_Pedi*pedi->Des_Pedi/<span style="color: #000000;">100</span><span style="color: #000000;">)</span><br /> TotalIpi = TotalIpi + <span style="color: #000000;">(</span>Pedi->Qtd_Pedi*Pedi->Prc_Pedi*Pedi->Ipi_Pedi/<span style="color: #000000;">100</span><span style="color: #000000;">)</span>-<span style="color: #000000;">(</span><span style="color: #000000;">(</span>Pedi->Qtd_Pedi*Pedi->Prc_Pedi*Pedi->Ipi_Pedi/<span style="color: #000000;">100</span><span style="color: #000000;">)</span>*Pedi->Des_Pedi/<span style="color: #000000;">100</span><span style="color: #000000;">)</span><br /> nQtd_Pedi=nQtd_Pedi+Pedi->Qtd_Pedi<br /> <span style="color: #00C800;">If</span> !Empty<span style="color: #000000;">(</span>Pedi->Obm_Pedi<span style="color: #000000;">)</span><br /> cText := Pedi->Obm_Pedi<br /> nLines := MlCount<span style="color: #000000;">(</span>Alltrim<span style="color: #000000;">(</span>cText<span style="color: #000000;">)</span>, <span style="color: #000000;">70</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">FOR</span> nFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nLines<br /> cLine := MemoLine<span style="color: #000000;">(</span>Alltrim<span style="color: #000000;">(</span>cText<span style="color: #000000;">)</span>, <span style="color: #000000;">70</span>, nFor<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span>prow, PCol*<span style="color: #000000;">006</span>, cLine, oFont3<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /> <span style="color: #00C800;">Endif</span><br /> prow+=nRowStep<br /><br /> Pedi-><span style="color: #000000;">(</span>dbskip<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">If</span> prow>nRowStep*<span style="color: #000000;">47</span><br /> prow := <span style="color: #000000;">1</span><br /> nPag++<br /> oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #000000;">StartPage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> CAJAROUND_<span style="color: #000000;">(</span><span style="color: #000000;">0.5</span>, <span style="color: #000000;">0.3</span>, <span style="color: #000000;">20.5</span>, <span style="color: #000000;">1.4</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span>, oPrn, oPen4<span style="color: #000000;">)</span><br /> CAJAROUND_<span style="color: #000000;">(</span><span style="color: #000000;">0.5</span>, <span style="color: #000000;">1.4</span>, <span style="color: #000000;">20.5</span>, <span style="color: #000000;">1.9</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span>, oPrn, oPen4<span style="color: #000000;">)</span><br /> CAJAROUND_<span style="color: #000000;">(</span><span style="color: #000000;">0.5</span>, <span style="color: #000000;">24.7</span>, <span style="color: #000000;">20.5</span>, <span style="color: #000000;">28.5</span>, <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span>, oPrn, oPen4<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"ESPELHO PEDIDO DE VENDA - "</span>+Alltrim<span style="color: #000000;">(</span>Empr->Nom_Empr<span style="color: #000000;">)</span>, oFont4<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, pcol*<span style="color: #000000;">057</span>, <span style="color: #ff0000;">"EM: "</span>+dtoc<span style="color: #000000;">(</span>date<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">' - '</span>+time<span style="color: #000000;">(</span><span style="color: #000000;">)</span>+<span style="color: #ff0000;">" PAG: "</span>+Alltrim<span style="color: #000000;">(</span>Str<span style="color: #000000;">(</span>nPag<span style="color: #000000;">)</span><span style="color: #000000;">)</span>, oFont2<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"PEDIDO: "</span>+Alltrim<span style="color: #000000;">(</span>Pedm->Cod_Pedm<span style="color: #000000;">)</span>+<span style="color: #ff0000;">"-"</span>+Pedm->Ser_Pedm+<span style="color: #ff0000;">" SIT: "</span>+Pedm->Sta_Pedm+<span style="color: #ff0000;">" "</span>+<span style="color: #ff0000;">" EMISSÃO: "</span>+DtoC<span style="color: #000000;">(</span>Pedm->Dat_Pedm<span style="color: #000000;">)</span>, oFont2<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"ITEN GR-CÓD. DESCRIÇÃO PRODUTO"</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">043</span>, <span style="color: #ff0000;">"MD"</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">047</span>, <span style="color: #ff0000;">"QTD."</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">052</span>, <span style="color: #ff0000;">"PREÇO"</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">057</span>, <span style="color: #ff0000;">"DESC."</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">063</span>, <span style="color: #ff0000;">"IPI"</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">069</span>, <span style="color: #ff0000;">"TOTAL"</span>, oFont1<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> prow+=nRowStep<br /> <span style="color: #00C800;">Endif</span><br /> End<br /><br /> TotalLiq = TotalBru - Totaldes + TotalIpi<br /><span style="color: #B900B9;">// oPrn:Say( (nRowStep*48)-nIten, Pcol*3, Repl('_', 124), oFont1)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nRowStep*<span style="color: #000000;">49</span><span style="color: #000000;">)</span>-nIten, Pcol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"TOTAL DO PEDIDO"</span>, oFont1<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nRowStep*<span style="color: #000000;">49</span><span style="color: #000000;">)</span>-nIten, Pcol*<span style="color: #000000;">049</span>, Tran<span style="color: #000000;">(</span>nQtd_Pedi, <span style="color: #ff0000;">"9999999"</span><span style="color: #000000;">)</span>, oFont1,,,, <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nRowStep*<span style="color: #000000;">49</span><span style="color: #000000;">)</span>-nIten, Pcol*<span style="color: #000000;">060</span>, Tran<span style="color: #000000;">(</span>TotalDes, <span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">)</span>, oFont1,,,, <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nRowStep*<span style="color: #000000;">49</span><span style="color: #000000;">)</span>-nIten, Pcol*<span style="color: #000000;">065</span>, Tran<span style="color: #000000;">(</span>TotalIpi, <span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">)</span>, oFont1,,,, <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> <span style="color: #000000;">(</span>nRowStep*<span style="color: #000000;">49</span><span style="color: #000000;">)</span>-nIten, Pcol*<span style="color: #000000;">072</span>, Tran<span style="color: #000000;">(</span>TotalLiq, <span style="color: #ff0000;">"@E 999,999.99"</span><span style="color: #000000;">)</span>, oFont1,,,, <span style="color: #000000;">1</span><span style="color: #000000;">)</span><br /> cText := Pedm->Obs_Pedm<br /> nLines := MlCount<span style="color: #000000;">(</span>Alltrim<span style="color: #000000;">(</span>cText<span style="color: #000000;">)</span>,<span style="color: #000000;">115</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">FOR</span> nFor := <span style="color: #000000;">1</span> <span style="color: #0000ff;">TO</span> nLines<br /> cLine := MemoLine<span style="color: #000000;">(</span>Alltrim<span style="color: #000000;">(</span>cText<span style="color: #000000;">)</span>, <span style="color: #000000;">115</span>, nFor<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span><span style="color: #000000;">(</span>nRowStep*<span style="color: #000000;">(</span><span style="color: #000000;">50</span>+nFor<span style="color: #000000;">)</span><span style="color: #000000;">)</span>-nIten, PCol*<span style="color: #000000;">003</span>, cLine, oFont3<span style="color: #000000;">)</span><br /> <span style="color: #00C800;">NEXT</span><br /> oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ENDPRINT</span><br /> oFont1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oFont2:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oFont3:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oFont4:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> dbClearRelation<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> DbSelectArea<span style="color: #000000;">(</span><span style="color: #ff0000;">"Pedm"</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:jez6hnfv]
obs: com rpreview.prg da FWH1111 mostra CORRETO |
preview com fwh1204 (RESOLVIDO) | Por favor cambia esta línea y comprueba el resultado:
nRowStep = oPrn:nVertRes() / 60
cambia 60 por 50, ó 40, y veamos como afecta al resultado |
preview com fwh1204 (RESOLVIDO) | Antonio
não obtive sucesso... aparentemente exibiu da mesma maneira <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( --> |
preview com fwh1204 (RESOLVIDO) | Despues de remover gran parte del codigo ya que no colocaste las DBF, compiló correctamente...
[img:u08ioekv]http://www.mayapos.com/FiveWin/preview.png[/img:u08ioekv] |
preview com fwh1204 (RESOLVIDO) | com o codigo abaixo:
[code=fw:1w5rkalw]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> RPed06<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">Local</span> oPrn, oFont1, oFont2, oFont3, oFont4, oPen4, nRecno := Pedm-><span style="color: #000000;">(</span>Recno<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span>,;<br /> nRowStep, nColStep, prow, pcol, cText, cLine, nFor, nLines,;<br /> Start := .t., TotalBru:=<span style="color: #000000;">0</span>, TotalLiq:=<span style="color: #000000;">0</span>, TotalDes:=<span style="color: #000000;">0</span>, TotalIpi:=<span style="color: #000000;">0</span>,;<br /> TotBru:=<span style="color: #000000;">0</span>, TotLiq:=<span style="color: #000000;">0</span>, TotDes:=<span style="color: #000000;">0</span>, TotIpi:=<span style="color: #000000;">0</span>, nQtd_Pedi:=<span style="color: #000000;">0</span>, nIten:=<span style="color: #000000;">0</span>, nPag:= <span style="color: #000000;">1</span><br /><br /> <span style="color: #00C800;">PRINT</span> oPrn <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ESPELHO PEDIDO VENDA"</span> PREVIEW<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont1 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-08</span> <span style="color: #0000ff;">OF</span> oPrn<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont2 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-08</span> BOLD <span style="color: #0000ff;">OF</span> oPrn<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont3 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-07</span> <span style="color: #0000ff;">OF</span> oPrn<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont4 <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"ARIAL"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">-09</span> BOLD <span style="color: #0000ff;">OF</span> oPrn<br /><br /> nRowStep = oPrn:<span style="color: #000000;">nVertRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">60</span> <span style="color: #B900B9;">// We want 60 rows</span><br /> nColStep = oPrn:<span style="color: #000000;">nHorzRes</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> / <span style="color: #000000;">78</span> <span style="color: #B900B9;">// We want 78 cols</span><br /> prow:=nRowStep<br /> pcol:=nColStep<br /> <span style="color: #0000ff;">PAGE</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, pcol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"ESPELHO PEDIDO DE VENDA"</span>, oFont4<span style="color: #000000;">)</span><br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, pcol*<span style="color: #000000;">057</span>, <span style="color: #ff0000;">"EM: TESTE ETSTE TESTE"</span>, oFont2<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"PEDIDO TESTEEEEEEEEEEEEEEEEEE"</span>, oFont2<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"FORMA PAGM.: TESTE TESTE"</span>, oFont2<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"CLIENTE: TETSTE ETSTE ETSTE TESTE"</span>, oFont1<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"END.: TESTE ETSTE ETSTE ETSTE "</span>, oFont1<span style="color: #000000;">)</span><br /> prow+=nRowStep<br /> oPrn:<span style="color: #0000ff;">Say</span><span style="color: #000000;">(</span> prow, PCol*<span style="color: #000000;">003</span>, <span style="color: #ff0000;">"testeg fgf g sdf gdfgdsfgfdsgdsfgdsfgdsfgdf "</span>, oFont1<span style="color: #000000;">)</span><br /><br /> oPrn:<span style="color: #0000ff;">EndPage</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">ENDPRINT</span><br /><br /><span style="color: #00C800;">Return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:1w5rkalw]
resulta:
[img:1w5rkalw]http://oi48.tinypic.com/2hcg6yt.jpg[/img:1w5rkalw]
com fwh1111 e anterioras trabalha normal.
qual exemplo da pasta \samples posso compilar para comparar? |
preview com fwh1204 (RESOLVIDO) | Please place this call before:
MsgInfo( oPrn:nVertRes() )
nRowStep = oPrn:nVertRes() / 60 // We want 60 rows
so we know the vertical resolution of the printer |
preview com fwh1204 (RESOLVIDO) | antonio MsgInfo( oPrn:nVertRes() ) = 7016
and
rpreview.prg <=> previous version returns the same value = 7016 |
preview com fwh1204 (RESOLVIDO) | RESOLVIDO
na linha 1377 do rpreview.prg fwh1204
[code=fw:1s61zoev]<div class="fw" id="{CB}" style="font-family: monospace;"><br />before<br /> <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lZoom</span> .and. ! lInit<br /> ::<span style="color: #000000;">Zoom</span><span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span> <span style="color: #B900B9;">// A.L. 08 Oct 2007</span><br /> <span style="color: #00C800;">endif</span><br /><br />after<br /><br /> <span style="color: #00C800;">if</span> ! ::<span style="color: #000000;">lZoom</span> .and. ! lInit<br /><span style="color: #B900B9;">// ::Zoom( .T. ) // A.L. 08 Oct 2007 <= essa linha foi comentada</span><br /> <span style="color: #00C800;">endif</span><br /> </div>[/code:1s61zoev]
thank you all |
preview com fwh1204 (RESOLVIDO) | Muy bien. gracias <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) --> |
preview file PDF | Hi,
You can download here:
<!-- m --><a class="postlink" href="http://ifile.it/q9ufb7r/quarkpdf.zip">http://ifile.it/q9ufb7r/quarkpdf.zip</a><!-- m -->
Saludos
Arturo |
preview file PDF | Dear Arturo,
Can you preview PDF file without any installation PDF Reader (any program)?
Regards,
Dutch |
preview file PDF | source code ? |
preview file PDF | Hello Duch,
A Download-link
<!-- m --><a class="postlink" href="http://www.softpedia.com/get/Office-tools/PDF/Cool-PDF-Reader.shtml">http://www.softpedia.com/get/Office-too ... ader.shtml</a><!-- m -->
[color=#FF0000:3fyd6axv]Cool PDF Reader[/color:3fyd6axv] is Freeware and a Standalone Exe-file
( The fastest and smallest Reader ( only 650 K ). No install needed )
Just include the Exe-file in Your Install-directory.
[img:3fyd6axv]http://www.pflegeplus.com/pictures/coolpdf,jpg[/img:3fyd6axv]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> |
preview file PDF | Dear Uwe,
I would like to open PDF file without execute any program. I just found some program that provide SDK DLL or Active X for open PDF file. It is interesting solution.
<!-- m --><a class="postlink" href="http://www.soraxsoft.com">http://www.soraxsoft.com</a><!-- m -->
<!-- m --><a class="postlink" href="http://www.quickpdflibrary.com">http://www.quickpdflibrary.com</a><!-- m -->
Regards,
Dutch |
preview file PDF | Hi Dutch,
Preview PDF is a new class for FWH, and you can include in your aplication exe,
No requeired Activex, ocx or ole
Now, We are woking in the print pdf
regard
Arturo |
preview file PDF | Dear Arturo,
[quote="arturo tamayo":6qwq4dgq]Hi Dutch,
Preview PDF is a new class for FWH, and you can include in your aplication exe,
No requeired Activex, ocx or ole
Now, We are woking in the print pdf
regard
Arturo[/quote:6qwq4dgq]
Great news.
Thanks. |
preview file PDF | Buen trabajo Arturo, ya nos iras contando mas cosas. |
preview file PDF | Arturo,
I would like to implement your new class in our app ASAP, do you have a timeline - date of release? |
preview file PDF | Arturo;
What I really need (-really bad-) is a way to print pdfs without having to open for preview. Straight from code:
[code=fw:23sl6neh]<div class="fw" id="{CB}" style="font-family: monospace;"><br />cPdf := <span style="color: #ff0000;">"c:<span style="color: #000000;">\s</span>ome.pdf"</span><br />PrintPdf<span style="color: #000000;">(</span> cPdf, cPrinter, nCopies <span style="color: #000000;">)</span><br /> </div>[/code:23sl6neh]
Just like that.
Any hopes?
Reinaldo. |
preview file PDF | Hi Reinaldo
I use adobe reader for this - I save the location of acrord32.exe for each user
C:\Program Files\Adobe\Reader 10.0\Reader\AcroRd32.exe - I also have a function that finds acrord32.exe so when the user updates adobe reader they
can update the path.
I save the path into an array of different parameters that I pass to each prg file
aPrivs[19] := system->adobepath
then in my code I use
bAdobePath := {|cPdf| alltrim(aPrivs[19]) + ' /t' + ' ' + cPdf} // the /t switch makes adobe go the printer or if you
want a preview remove /t switch
then call WinExec(eval(bAdobePath,cPdf))
Colin |
preview file PDF | for printing pdf's and other files without dialogs, you can also use 'ShellExecute' with 'printto' parameter, as described here
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=2027&hilit=printto">viewtopic.php?f=3&t=2027&hilit=printto</a><!-- l -->,
<!-- m --><a class="postlink" href="http://forums.adobe.com/thread/760363">http://forums.adobe.com/thread/760363</a><!-- m -->
or here
<!-- m --><a class="postlink" href="http://delphi.about.com/od/delphitips2009/qt/delphi-print-documents-shellexecute-print-printto.htm">http://delphi.about.com/od/delphitips20 ... rintto.htm</a><!-- m -->
Samples:
ShellExecute( 0, cOperation, cPathFilename, cParameters, cDirectory, nShowCommand )
ShellExecute( 0, 'printto', 'c:\pdf\test.pdf', Chr( 34) + <cPrinter> + Chr( 34), '', 0 ) |
preview file PDF | It seems as Arturo is using free SumatraPDF:
[url:110dptvd]http://code.google.com/p/sumatrapdf/[/url:110dptvd]
[url:110dptvd]http://blog.kowalczyk.info/software/sumatrapdf/free-pdf-reader.html[/url:110dptvd]
[img:110dptvd]http://img163.imageshack.us/img163/8955/capturegex.png[/img:110dptvd]
Good finding, Arturo |
preview file PDF | I have tried sumatra as well as acrobat. There are problems with both approaches. With Sumatra it all goes well until about the 20th copy when it begins to slow down. I need a way to print 1000 pdfs one after the next without previewing. It seems like the constant calling of sumatra fragments memory in such a way the computer starts to slowdown to a crawl.
I'm now about to experiment with a .dll from Sorax (<!-- m --><a class="postlink" href="http://www.soraxsoft.com/index.html">http://www.soraxsoft.com/index.html</a><!-- m -->) I'm hopeful that this is the solution.
Reinaldo. |
preview file PDF | Hi Antonio,
No, I'm not using SumatraPDF, I'm using mupdf and thirdparty, sumatraPDF also uses mupdf
Can see <!-- w --><a class="postlink" href="http://www.mupdf.com">www.mupdf.com</a><!-- w -->
but has a problem, there is no documentation
Regard,
Arturo |
preview file PDF | Arturo;
Can you share some code on how you are using it? Please send to reianaldo dot crespo at gmail thank you.
Can you print a pdf from source without previewing it first?
Can you preview a pdf in a dialog or window?
Thank you,
Reinaldo. |
preview file PDF | Hi Reinaldo,
Yes, soon will have the code, complete
Now, I'm working on a way to send to the printer, if you can print without preview
The management pdf file code is quite complicated, so it took me a while.
After having these functions running smoothly code will have to complete.
Regards,
Arturo |
preview file PDF | Hi!
Any progress? |
preview impresion queda detras de dialogo | Amigos, tengo el siguiente problema.
cuando tengo un dialogo con la opcion de imprimir, presiono el boton, se ejecuta la funcion, pero
el dialogo queda en la pantalla sobre la ventana de la impresion, tengo que cerrar este para recien ver
que quiero imprimir, le puse modal a la impresion, pero siempre queda detras del dialogo que lo
genero...
Alguna idea...
FWH 8.12, BCC 5.5, Verce 4.3, workshop 4.5, xHarbour |
preview impresion queda detras de dialogo | si usas tprinter:
oPrn:lPrvModal := .t. |
preview impresion queda detras de dialogo | Hola, mira aquí:
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=6&t=19828&start=0&hilit=mdichild+rpreview">viewtopic.php?f=6&t=19828&start=0&hilit=mdichild+rpreview</a><!-- l -->
Saludos. |
preview problem | I may asked that before but with the latest updates I may have different answers can I show all fields of database after listing avoiding the message "Report width is greater than page width" I need the way to update the methods to distribute my afields all over the report. May be page 1-3 contain certain fields,4-6 another fields for the same records .
Thanks |
preview problem | Ehab,
Why don't you modify your report to choose just the fields that fit on the page, and run several reports one after another ? |
preview problem | How will I choose my fields in every report ? In what step of preview method I will update? |
preview problem | Ehab,
Please review samples\report\*.prg samples |
preview problems | FW 8.01
Today I had to take a photo from the screen with my camera.
If I try to make a screenshot with the capture software the lines are
there and I can’t demonstrate the problem.
What could be the problem.
I use the report.prg from the Fivewin samples and my own database.
I uploaded a zip to <!-- w --><a class="postlink" href="http://www.atzwanger.com/fwreport/report.zip">www.atzwanger.com/fwreport/report.zip</a><!-- w -->
Thanks in advance
Otto
[img:jh8njgln]http://www.atzwanger.com/fwreport/report.jpg[/img:jh8njgln] |
preview problems | Otto,
What is the problem ?
Is it a painting error ? A runtime error ? |
preview problems | Antonio, thank you for your answer.
There should be a line in every row.
Regards,
Otto |
preview problems | Otto, please build a reduced and self-contained sample of the problem.
EMG |
preview problems | Enrico, thank you for your answer.
The sample is here:
<!-- w --><a class="postlink" href="http://www.atzwanger.com/fwreport/report.zip">www.atzwanger.com/fwreport/report.zip</a><!-- w -->
Regards,
Otto |
preview problems | Otto,
I compiled and ran your sample and all the lines are showing here.
I am using FWH 8.01/xHarbour and XP Pro, SP2.
James |
preview problems | James, would you be so kind to send me your exe.
Regards,
Otto |
preview problems | [quote="Otto":30dd0gh1]Enrico, thank you for your answer.
The sample is here:
<!-- w --><a class="postlink" href="http://www.atzwanger.com/fwreport/report.zip">www.atzwanger.com/fwreport/report.zip</a><!-- w -->
Regards,
Otto[/quote:30dd0gh1]
REPORT.prg(29) Warning W0001 Ambiguous reference: 'BAR'
Once fixed this, it seems to work fine. I can see all the lines.
EMG |
preview problems | Enrico, thank you.
I commended out line 29. There is no warning now.
But the result is still the same. I am on a VISTA PC.
Now I tried with XP. There all is working correctly.
prev32.dll in my FWH is from 11-5-2005.
Regards,
Otto |
preview problems | One of the many Vista's bugs and incompatibilities? <!-- s:-) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":-)" title="Smile" /><!-- s:-) -->
EMG |
preview problems | Enrico, the problem is that VISTA is the standard we have to follow.
Regards,
Otto |
preview problems | Otto,
I fully agree that FWH has to properly work on Vista, and we need to solve it.
But just a comment: only 9% of the market use Vista these days. Around 75% still use XP.
I recently saw the comparative chart and was impressed with the results... I trying to locate it to show it to you. |
preview problems | Otto,
Are you having this problem with all reports when running on Vista, or just that report? I don't have Vista here to check.
James |
preview problems | [quote="Otto":15io4jwm]Enrico, the problem is that VISTA is the standard we have to follow.[/quote:15io4jwm]
Yes, I'm only saying that if it is really a bug of Vista then it will be probably fixed by MS.
EMG |
preview problems | Early XP was a real disaster, do you remember?
EMG |
preview problems | Otto
I compiled and ran your report on my vista (premium home editon), it shows OK . I am using xcc compiler (xharbour.com)
Just a remark, though i do not like vista, my app runs OK with Vista . Fwh is working properly, no problem with reports.
Please try to check your prev32.dll maybe something wrong there.
HTH
Richard |
preview problems | Here its working fine with Vista Ultimate 32 (all upgrades applied) and FWH 8.02 pre-release:
[url=http://imageshack.us:1j417c67][img:1j417c67]http://img219.imageshack.us/img219/7489/reportwf9.png[/img:1j417c67][/url:1j417c67] |
preview problems | Antonio, can you please mail me your exe file for a test.
Thanks in advance
Otto |
preview problems | Otto,
Already sent |
preview problems | Thank you. The problem is the same as with my exe.
Regards,
Otto |
preview problems | Antonio, could you please test with AERO off.
With AERO on it is working here too.
Thanks in advance
Otto |
preview problems | Otto,
Maybe it is your screen resolution or grahics card?
James |
preview problems | Otto,
Without themes fails in Vista.
It seems as a Windows Vista metafiles management bug. |
preview problems | Antonio, do you know I SP1 for VISTA resolves this problem?
Regards,
Otto |
preview problems with fwh 2.6 | Antonio,
I noticed that the metafile.c program was supplemented with metafi32.c
I am experincing 2 problems with the "new metafile" logic.
1. Each time I use the preview process ( vanilla - right out of the box ) with my report object, I get the following message - EVERY TIME.
( from metafi32.c )
Error (6) deleting enhanced metafile
Error Description
This is new with FWH 2.6 over FWH 2.5
2. If my report object is sized for legal sized / landscape paper and I double-click on the page, it does not get "larger" as in FWH 2.5. If my report object is for letter page portrait - it does get (slightly) larger.
The behaviour is much different from FWH 2.5 - before you started coding the previewer for ENHANCED METAFILES.
What is the difference? How can I address this? Why am I getting the message?
Etc.
Thanks in advance for your help.
PS - I think I will like this new message format once I get used to it.; |
preview problems with fwh 2.6 | Double click on preview screen.
If the image is for Portrait / 8.5 x 11 inch paper
the image WILL GET LARGER.
It appears that all LANDSCAPE reports, both 8.5 x 11 and 8.5 x 14 reports DO NOT GET LARGER by double clicking. |
preview problems with fwh 2.6 | Don,
Have you check if there are others EMF files in your windows TEMP (GetEnv("TEMP")) directory ?
Does the report preview remains open ?
Could you provide a sample to reproduce it ? Thanks. |
preview problems with fwh 2.6 | Don,
Could you please test samples\TestPrn2.prg and check if it works ok for you ? Here it works ok. Thanks. |
preview problems with fwh 2.6 | I have isolated the problem.
Embarassingly (?) I must report the problem was due to "old sloppy coding".
Here is what happened.
In my library, I coded:
oReport:End() after calling the report-preview process. Apparently, this was needed at one point many years ago.
Problem was, your preview processor ended the report from within the Play() method. The enhanced metafile was deleted during this process.
When I called oreport:end() the oreport:device:end() method attempted to delete the metafile (which was deleted from the ::play() - ::end() - ::endpage() method) and the resultant error occured.
Consequently, when I called oreport:end() there was no metafile to delete - hence the error.
I'm not sure why this "old sloppy code" of mine did not produce a problem with prior versions (fwh 2.5 and Harbour .44). But the important thing is I'm ok now.
Thanks for your continued service and excellent product. Sorry for "venting" off-line. Just goes to show, most computer "users" (me in this case) are inherintly lazy, but, if the developers ( you in this case )make the users think a bit on their own, the users usually figure it out on their own.
Sincerely,
don |
preview problems with fwh 2.6 | Don,
Congratulations for solving it. We are happy to know its ok now. |
preview report got error when Windows User name Chinese word | Hi Mr.Rao
When Windows user name is English name, preview report work fine.
But Chinese name, not work and got error message below:
[img:13u7ukfy]https://i.postimg.cc/fRHtDthT/2023-08-29-120936.jpg[/img:13u7ukfy]
[img:13u7ukfy]https://i.postimg.cc/FsTsJMCT/2023-08-29-120953.jpg[/img:13u7ukfy]
[img:13u7ukfy]https://i.postimg.cc/1t0yR2Nc/2023-08-29-121023.jpg[/img:13u7ukfy]
[img:13u7ukfy]https://i.postimg.cc/xTpndKq7/2023-08-29-121041.jpg[/img:13u7ukfy] |
preview report got error when Windows User name Chinese word | Have you included this code in your main program?
[code=fw:2gy1whhn]<div class="fw" id="{CB}" style="font-family: monospace;">HB_CDPSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">)</span></div>[/code:2gy1whhn]
If not please include this and let is know if the problem is resolved |
preview report got error when Windows User name Chinese word | [quote="nageswaragunupudi":2p9zkhfn]Have you included this code in your main program?
[code=fw:2p9zkhfn]<div class="fw" id="{CB}" style="font-family: monospace;">HB_CDPSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">)</span></div>[/code:2p9zkhfn]
If not please include this and let is know if the problem is resolved[/quote:2p9zkhfn]
Yes, I set it. but not work.
[code=fw:2p9zkhfn]<div class="fw" id="{CB}" style="font-family: monospace;"><br />HB_LangSelect<span style="color: #000000;">(</span> <span style="color: #ff0000;">"zh"</span> <span style="color: #000000;">)</span><br />HB_SetCodePage<span style="color: #000000;">(</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">)</span><br />HB_CDPSELECT<span style="color: #000000;">(</span> <span style="color: #ff0000;">"UTF8"</span> <span style="color: #000000;">)</span><br /><br />Fw_SetUnicode<span style="color: #000000;">(</span> .T. <span style="color: #000000;">)</span><br /> </div>[/code:2p9zkhfn] |
preview report got error when Windows User name Chinese word | I see.
We will check. |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.