Page 1 of 1

Imprimir el símbolo & en un título????

PostPosted: Wed Feb 01, 2023 9:50 pm
by D.Fernandez
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

Re: Imprimir el símbolo & en un título????

PostPosted: Thu Feb 02, 2023 4:27 am
by D.Fernandez
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

Re: Imprimir el símbolo & en un título????

PostPosted: Thu Feb 02, 2023 8:59 am
by Antonio Linares
Estimado Ruben,

Has probado a poner dos caracteres iguales ?

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

Re: Imprimir el símbolo & en un título????

PostPosted: Thu Feb 02, 2023 12:03 pm
by D.Fernandez
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

Re: Imprimir el símbolo & en un título????

PostPosted: Thu Feb 02, 2023 2:23 pm
by karinha
Intene asi:

Code: Select all  Expand view

#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/viewt ... =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.

Re: Imprimir el símbolo & en un título????

PostPosted: Thu Feb 02, 2023 3:43 pm
by D.Fernandez
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