crax15 Posted June 29, 2012 at 09:56 AM Report Share #466369 Posted June 29, 2012 at 09:56 AM 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 at 10:56 AM Report Share #466388 Posted June 29, 2012 at 10:56 AM 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 at 02:53 PM Author Report Share #466454 Posted June 29, 2012 at 02:53 PM 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 at 04:21 PM Report Share #466476 Posted June 29, 2012 at 04:21 PM 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