HighTechTalks DotNet Forums  

problem with report

Dotnet Framework (ODBC.net) microsoft.public.dotnet.framework.odbcnet


Discuss problem with report in the Dotnet Framework (ODBC.net) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Henri
 
Posts: n/a

Default problem with report - 12-09-2003 , 05:28 PM






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




Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.