Sousa Pambo

Sousa Pambo

  • NA
  • 92
  • 24k

Crystal Report

Apr 25 2016 8:11 AM
Hi Friends, help on printing one page per one list View row. How to generate multpage
 
Public Sub PrintFacturaTds(ByVal ls As ListView, ByVal f As FacturasMes)
ds.Clear()
Dim ordem As Integer = 1
Dim i As Integer = 0
CAg.preencherDadosCompany()
Dim dt As DataTable
dt = ds.Tbl_Pagamento
While i <= ls.Items.Count - 1
'dt.Clear()
Dim dr As DataRow
dr = dt.NewRow
dr.Item("cliente") = ls.Items(i).SubItems(0).Text
dr.Item("Contador") = ls.Items(i).SubItems(1).Text
dr.Item("Leitura") = CDbl(ls.Items(i).SubItems(3).Text)
dr.Item("divida") = CDbl(ls.Items(i).SubItems(10).Text)
dr.Item("LeitAnterior") = CDbl(ls.Items(i).SubItems(2).Text)
dr.Item("Qty_Consumida") = CInt(ls.Items(i).SubItems(3).Text) - CInt(ls.Items(i).SubItems(2).Text)
dr.Item("saldo") = CDbl(ls.Items(i).SubItems(5).Text)
dr.Item("Bairro") = f.cbBairro.Text
dr.Item("SubBairro") = f.cbSub.Text
dr.Item("UserN") = f.lbNomeUser.Text
dr.Item("Valor_Consumo") = CDbl(ls.Items(i).SubItems(4).Text)
dr.Item("mes") = f.cbMes.Text
i = i + 1
dt.Rows.Add(dr)
End While
End Sub
------------------------------------------------------------------------------------------------------------------------------
Private Sub btPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btPrint.Click
Rtds.PrintFacturaTds(lsFacturaTds, Me)
prt = New frmPrintFactura
prt.Location = New System.Drawing.Point(parameterXLocation(), parameterYLocation())
prt.ShowDialog()
End Sub
 
------------------------------------------------------------------------------------------------------------------------------ 
Private Sub frmPrintFactura_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
FacturaMesA51.SetDataSource(ds)
Me.CrystalReportViewer1.ReportSource = FacturaMesA51
Me.CrystalReportViewer1.RefreshReport()
Me.CrystalReportViewer1.Zoom(90)
End Sub
------------------------------------------------------------------------------------------------------------------ 
 What's the problem printing one page only?

Answers (1)