Jump to content

Imprimir Dados na folha


marceluh
 Share

Recommended Posts

Eu tenho um relatório feito em crystal report...mas ele imprime-me tudo na folha.  mas eu queria que na folha que eu vou imprimir só imprimi-se os valores >20.

Isso é com o printDocument certo???

será que alguem me poderia ajudar...

cumps.

Link to comment
Share on other sites

Tens que alterar o sql para filtrar os valores que queres antes mostrar o report no crystalreportviewer.

"The Dark Side Clouds Everthing. Impossible To See The Future Is."My rig: Intel Core 2 Quad Q9450 | abit IP35P | 4G Kingston 800 Mhz | XFX GeForce 9800 GX2 1G ddr3 | 2X WD5000AAJS 500Gb Sata 2 | PSU 600W || Caixa El-Diablo | Creative XMod

Link to comment
Share on other sites

O código que tenho é este:

Dim rpt As New CrystalReport1
Dim ds As New Dataset1
Dim strConn As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=gestao.mdb"

Dim adapter2 As New OleDbDataAdapter("Select * FROM linha where linha=111", strConn)

        adapter2.Fill(ds, "Linha")

        rpt.SetDataSource(ds) 

        CrystalReportViewer1.ReportSource = rpt 

e meti no crystal reports a mostrar 2 campos da tabela linha e eu queri que me mostra-se apenas quando linha=111 mas esta-me a mostrar todos os dados que eu tenho na tabela.

cumps.

Link to comment
Share on other sites

Troca

rpt.SetDataSource(ds)

com 

rpt.SetDataSource(ds.Tables("Linha"))

ver se resolve o problema.

"The Dark Side Clouds Everthing. Impossible To See The Future Is."My rig: Intel Core 2 Quad Q9450 | abit IP35P | 4G Kingston 800 Mhz | XFX GeForce 9800 GX2 1G ddr3 | 2X WD5000AAJS 500Gb Sata 2 | PSU 600W || Caixa El-Diablo | Creative XMod

Link to comment
Share on other sites

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
 Share

×
×
  • 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.