Jump to content

Recommended Posts

Posted (edited)

Olá a todos,

alguém poderia me dar uma ajudinha de como imprimir

números em um relatório com alinhamento da direita para

esquerda, para que fique vírgula em baixo de vírgula.

O código que estou usando é esse abaixo:

e.Graphics.DrawString(vQtdSacos.ToString, _
fonteNormal, Brushes.Black, margemEsq + 700, _
PosicaoDaLinha, New StringFormat())

Agradecido,

att,

Edited by ribeiro55

Edi Carlos Simões

Estudante de Análise e Desenvolvimento de Sistemas

edisimoes@bol.com.br

http://www.desenvolvenetma.com.br

http://analisedesistemas.bl.ee

Posted

Olá amigo vikcch,

não usei o seu código, mais graças a ele minha mente abriu

e consegui ver o que poderia ser feito, e foi resolvido da seguinte

forma.

Vou deixar o código, se alguém tiver a mesma dúvida.

e.Graphics.DrawString(vQtdSacos.ToString.PadLeft(4, " "), _
fonteNormal, Brushes.Black, margemEsq + 700, PosicaoDaLinha, New StringFormat())

valeu obrigado, até mais...

Edi Carlos Simões

Estudante de Análise e Desenvolvimento de Sistemas

edisimoes@bol.com.br

http://www.desenvolvenetma.com.br

http://analisedesistemas.bl.ee

Posted

o importante foi resolver o problema...

o code podia-se usar assim:

	    Dim myFont As New Font("Arial", 15)
    e.Graphics.DrawString("1200.00", myFont, Brushes.Black, 700 - TextRenderer.MeasureText("1200.00", myFont).Width, 10)
    e.Graphics.DrawString("1.00", myFont, Brushes.Black, 700 - TextRenderer.MeasureText("1.00", myFont).Width, 30)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.