locked
DataTable and Crystal Reports RRS feed

  • Question

  • User592719391 posted

    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



    Friday, December 21, 2012 7:15 AM

Answers

  • User614805505 posted

    Hi,

    myDS
    remain empty because he haven't add the 
    myDT
    to it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, December 23, 2012 1:38 AM

All replies

  • User614805505 posted

    Hi,

    myDS
    remain empty because he haven't add the 
    myDT
    to it.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, December 23, 2012 1:38 AM
  • User592719391 posted

    Cruzer Thanks for the reply!
    I tried and could not add the Ds Dt.
    Can you help me?

    Thank you again!

    Wednesday, December 26, 2012 8:52 AM
  • User592719391 posted

    Obrigado Cruzer!!

    Consegui adicionar o codigo corretamente!!

    Wednesday, December 26, 2012 9:11 AM