1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Imports System
Imports System.Data
Imports System.Data.OleDb
Imports Microsoft.VisualBasic
Public Class allPropReport
Private propDisplayQuery As String
Private cmdProp As OleDbCommand
Private dtaProp As OleDbDataAdapter
Private dtProp As DataTable
Public dsProp As New DataSet
Private rowNum As Integer
Private drProp As DataRow
Private Sub allPropReport_Load(sender As Object, e As EventArgs) Handles MyBase.Load
propDisplayQuery = "select proprietaire.* from proprietaire"
cmdProp = New OleDbCommand(propDisplayQuery)
dtaProp = New OleDbDataAdapter(cmdProp)
cmdProp.Connection = mainWinFrm.cnx
dtaProp.Fill(dsProp, "proprietaire")
dtProp = dsProp.Tables("proprietaire")
With Me.ReportViewer1
.LocalReport.DataSources.Clear()
.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local
.LocalReport.DataSources.Add(New Microsoft.Reporting.WinForms.ReportDataSource("ds", dsProp.Tables(0)))
'Dim rpt As Microsoft.Reporting.WinForms.ReportDataSource = New Microsoft.Reporting.WinForms.ReportDataSource("ds", dsProp.Tables("proprietaire"))
' .LocalReport.ReportPath = "C:\Users\black\Desktop\projet_société_mutuelle_des_services_agricoles\Gestion location appartements\Gestion location appartements\Report1.rdlc"
.DocumentMapCollapsed = True
.RefreshReport()
End With
End Sub |
Partager