H
Henri
hi all,
i'm using the "insertion model" of ADO.NET to see my reports. this model is
the desconnected model of NET. i have to create a dataset object (visual
dataset schema), base my report on it and after: a form with a
crystalreportviewer, configure its property "reportSource"
this method requires code which fills the dataset of our SQL's data and pass
it to our report with the "setdatasource" method.
i haven't any problem with one table but when i try it with several tables,
it's imposible
have you got any idea?
thanks a lot for your interest
here is my code:
Private fbase As New fInformeBase()
Private rpt As CrystalReport1 = New CrystalReport1()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim conexion As New OleDb.OleDbConnection(gCadenaConexion)
Dim sql As String = "SELECT AtributoPublicoObjetivo.* FROM PublicoObjetivo
INNER JOIN AtributoPublicoObjetivo ON PublicoObjetivo.IDPublicoObjetivo =
AtributoPublicoObjetivo.IDPublicoObjetivo WHERE (PublicoObjetivo.IDPlan)=" &
gIdPlan
Dim adapter As New OleDb.OleDbDataAdapter(sql, conexion)
Dim dataset As New DataSet()
adapter.Fill(dataset, "AtributoPublicoObjetivo")
rpt.SetDataSource(dataset)
fbase.CrystalReportViewer1.ReportSource = rpt
fbase.CrystalReportViewer1.Zoom(75)
fbase.StartPosition = FormStartPosition.Manual
fbase.Location = New Point(0, 0)
fbase.MdiParent = fPrincipal
fbase.Show()
end sub
i'm using the "insertion model" of ADO.NET to see my reports. this model is
the desconnected model of NET. i have to create a dataset object (visual
dataset schema), base my report on it and after: a form with a
crystalreportviewer, configure its property "reportSource"
this method requires code which fills the dataset of our SQL's data and pass
it to our report with the "setdatasource" method.
i haven't any problem with one table but when i try it with several tables,
it's imposible
have you got any idea?
thanks a lot for your interest
here is my code:
Private fbase As New fInformeBase()
Private rpt As CrystalReport1 = New CrystalReport1()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim conexion As New OleDb.OleDbConnection(gCadenaConexion)
Dim sql As String = "SELECT AtributoPublicoObjetivo.* FROM PublicoObjetivo
INNER JOIN AtributoPublicoObjetivo ON PublicoObjetivo.IDPublicoObjetivo =
AtributoPublicoObjetivo.IDPublicoObjetivo WHERE (PublicoObjetivo.IDPlan)=" &
gIdPlan
Dim adapter As New OleDb.OleDbDataAdapter(sql, conexion)
Dim dataset As New DataSet()
adapter.Fill(dataset, "AtributoPublicoObjetivo")
rpt.SetDataSource(dataset)
fbase.CrystalReportViewer1.ReportSource = rpt
fbase.CrystalReportViewer1.Zoom(75)
fbase.StartPosition = FormStartPosition.Manual
fbase.Location = New Point(0, 0)
fbase.MdiParent = fPrincipal
fbase.Show()
end sub