FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Imprimir el símbolo & en un título????
Posts: 555
Joined: Wed Jul 31, 2013 01:14 PM
Imprimir el símbolo & en un título????
Posted: Wed Feb 01, 2023 09:50 PM

Amigos, tengo un título de un reporte que contiene el símbolo inglés & (Dario & Dario), // También probé con chr(38) ...

No lo puedo imprimir, me imprime _ (linea baja)

Saludos

Gracias

(Usando la utilidad Utilprn de TheFull no tenía problema, pero estoy tratando de dejar de usar utilidades de terceros)

Ruben Dario Fernandez

Dario Fernandez

FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.

Maldonado - Uruguay
Posts: 555
Joined: Wed Jul 31, 2013 01:14 PM
Re: Imprimir el símbolo & en un título????
Posted: Thu Feb 02, 2023 04:27 AM
Un poco mas claro...

cTitulo33:="Gancedo & Asociados S.R.L."
oPrn:RoundBox( 1, 7.8, 2 , 13.8, 0.1,0.1, oPen1,CLR_WHITE, {cTitulo33, FFNT5, CLR_BLACK} ,"CM" )

No imprime el caracter &

Estoy tratando de dejar codigo de terceros, utilizaba tUtilPrn de Rafa TheFull (Gracias Rafa), y funciona bien.

Saludos
Ruben Fernandez
Dario Fernandez

FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.

Maldonado - Uruguay
Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Re: Imprimir el símbolo & en un título????
Posted: Thu Feb 02, 2023 08:59 AM

Estimado Ruben,

Has probado a poner dos caracteres iguales ?

"Gancedo && Asociados S.R.L."

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 555
Joined: Wed Jul 31, 2013 01:14 PM
Re: Imprimir el símbolo & en un título????
Posted: Thu Feb 02, 2023 12:03 PM
Hola Antonio, gracias por responder.

Con 2 carácteres iguales se vie bien en el preview, pero el PDF generado se muestran 2 cararteres &&.
Además el box redondo se muestra en el PDF con esquinas redondeadas y esquinas rectas.

Saludos

Ruben Dario Fernandez
ctitulo9 := "Gancedo && Asociados S.R.L."

oPrn:RoundBox( 1, 7.8, 1.8 , 13, 0.5,0.5, oPen1,CLR_WHITE, {cTitulo9, oFont5, CLR_BLACK} ,"CM" )
Probado con varios tipos de letra.

imagenes

https://postimg.cc/gallery/n7yZqFx
Dario Fernandez

FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.

Maldonado - Uruguay
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: Imprimir el símbolo & en un título????
Posted: Thu Feb 02, 2023 02:23 PM
Intene asi:
Code (fw): Select all Collapse
#Include "Fivewin.ch"

FUNCTION PrnBox()

   LOCAL oPrn, oFont, oBrush, ctitulo9, oPen

   ctitulo9 := "Gancedo && Asociados S.R.L."

   DEFINE BRUSH oBrush FILE "c:\fwh1905\bitmaps\backgrnd\pebbles.bmp"

   PRINT oPrn FILE "DARIOF.pdf"

   DEFINE FONT oFont NAME "VERDANA" SIZE 0, -12 OF oPrn BOLD
   DEFINE PEN oPen WIDTH  2                     OF oPrn

   PAGE

      oPrn:RoundBox( 1, 1, 5, 5, .5, .5, { CLR_HRED, 3 }, oBrush,          ;
                     { "FIRST" + CRLF + "SECOND", oFont, CLR_WHITE, "B" }, ;
                     "INCHES" )

      oPrn:RoundBox( 1, 7.8, 1.8 , 15.50, 0.5,0.5, oPen, { CLR_WHITE, 3 }, ;
                     { cTitulo9, oFont, CLR_BLACK }, "CM" )

   ENDPAGE

   ENDPRINT

   RELEASE FONT oFont
   RELEASE BRUSH oBrush

   IF FILE( "DARIOF.PDF" )

      MsgInfo( "DARIOF.PDF Generado.", "DARIOF.PDF Generado" )

   ENDIF

RETURN NIL

/*
[url]
http://forums.fivetechsupport.com/viewtopic.php?f=3&t=39498
[/url]
*/

/*
Silvio.Falconi escribió:
METHOD Box( nTop, nLeft, nBottom, nRight, ;
[Pen], ; // oPen/hPen/nColor/{nColor,nThickness}
[Brush], ; // nColor / oBrush
[aText], ; // { cText, oFont, nColor } Painted in center
cUnits ; // "CM", "MM", "INCHES"
)

I tried to use aText array but I can set only { cText, oFont, nColor } and it was printed in center
How I can to print it with align ?


Now, aText can be { cText, oFont, nTxtColor, cAlign }

cAlign:
"TL" : TopLeft
"TR" : TopRight
"T" : Top Center
"BL" : Bottom Left
"BR" : Bottom Right
"B" : Bottom Center
"L" : Left Vert Center
"R" : Right Vert Center

But you can use this for only String, though this string can be multi-line delimited by CRLF.
If you want to print 2 or more strings with different alignments, you need to write your own code for that
*/
https://forums.fivetechsupport.com/viewtopic.php?f=3&t=39498

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 555
Joined: Wed Jul 31, 2013 01:14 PM
Re: Imprimir el símbolo & en un título????
Posted: Thu Feb 02, 2023 03:43 PM

Gracias karinha, he descubierto que el carácter & no lo muestra con oPrn:RounBox() y si lo muestra con oPrn:Say()

Gracias, saludos

Ruben Fernandez

Dario Fernandez

FWH 2501, Harbour, MVS2022 Community, MySql & MariaDB, Dbf/Cdx VSCode.

Maldonado - Uruguay

Continue the discussion