none
No DATA show in my textbox RRS feed

  • Question

  • I have a problem regarding rdlc.... i put some textbox in the textbox i put  this expression

    =Fields!Username.Value but i got an error.... and it doesn't recognize the textbox that i input.

     Here's my code

    Imports System.Data.SqlClient
    Imports Microsoft.Reporting.WinForms
    Public Class Form3
        Dim conn As New SqlConnection("Server=Ian;database=mydb;user=sa;password=ianski;")
        Private Sub Form3_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

            ReportViewer1.ProcessingMode = ProcessingMode.Local

            Dim local As LocalReport
            local = ReportViewer1.LocalReport

            local.ReportPath= Application.StartUp & "\Report2.rdlc"


            Dim com As New SqlCommand("Select * From Login", conn)
            Dim da As New SqlDataAdapter(com)
            Dim bind As New BindingSource
            Dim ds As New DataSet
            conn.Open()
            da.Fill(ds)
            bind.DataSource = ds.Tables(0)
            conn.Close()

            Dim rds As New ReportDataSource
            rds.Name = "Login"
            rds.Value = ds.Tables(0)
            

            ReportViewer.LocalReport.DataSource.Add(rds)
            Me.ReportViewer1.RefreshReport()
        End Sub
    End Class


    noob vb programmer
    Tuesday, January 13, 2009 12:46 AM