DataTable and Crystal Reports

magosveloso

New member
Joined
Dec 21, 2012
Messages
1
Programming Experience
3-5
friends,

I use the code below to populate a datatable. He fills the datatable correctly, but when I try to view via crystal reports, the report is blank.

Any suggestions what I'm doing wrong?

Dim myDS As New dsTeste
Dim myDT As New dsTeste.DtTesteDataTable
Dim Linha As dsTeste.DtTesteRow

Dim i As Integer = 1
While i <= 5

myDT.Rows.Add(i, "magos", "15")
i = i + 1
End While

caminho = Server.MapPath("rptTeste.rpt")

Dim CR As New ReportDocument
CR.Load(caminho)
CR.SetDataSource(myDS)

CrystalReportViewer1.ReportSource = CR
CrystalReportViewer1.Zoom(100)
CrystalReportViewer1.Visible = True
 
Back
Top