crax15 Posted June 29, 2012 Report Share Posted June 29, 2012 Bom dia, eu andei a pesquisar e encontrei este código que funciona...: Private Sub btn_imprimir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_imprimir.Click PrintPreviewDialog1.Document = PrintDocument1 PrintPreviewDialog1.ShowDialog() End Sub Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage Dim bm As New Bitmap(Me.DataGridView1.Width, Me.DataGridView1.Height) DataGridView1.DrawToBitmap(bm, New Rectangle(0, 0, Me.DataGridView1.Width, Me.DataGridView1.Height)) e.Graphics.DrawImage(bm, 0, 0) End Sub Mas... não é bem isto que eu desejo... Eu queria poder editar a visualização da datagridview, porque da maneira que esta fica muito "tosco" muito simples... e gostava de poder acrescentar mais algumas coisas... Eu andei a ver o Crystal reports, mas não percebi como funciona para o que eu quero, porque parece que tenho de ir buscar isso a uma tabela da base de dados, e eu neste caso só quero que me vá buscar a datagridview que tenho no formulário... Gostava de uma ajudinha quem souber... Obrigado Pedro'O Link to comment Share on other sites More sharing options...
Caça Posted June 29, 2012 Report Share Posted June 29, 2012 Tens também os Microsoft Reports. Pedro Martins Não respondo a duvidas por PM Link to comment Share on other sites More sharing options...
crax15 Posted June 29, 2012 Author Report Share Posted June 29, 2012 Pois, e como se usa? É que eu tanto um como o outro nao estou a ver como se configura para o que quero... Pedro'O Link to comment Share on other sites More sharing options...
Caça Posted June 29, 2012 Report Share Posted June 29, 2012 Vê aqui, tens vários exemplos http://www.jorgepaulino.com/search/label/Microsoft%20Reports Pedro Martins Não respondo a duvidas por PM Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now