Hello!

how to view report particular Customer Name.............in this code when i m type from date or To date report is showing all customer information but i need single customer info with name or Date this is my code........ plz help me

sorry my english is not good

Imports System.Data
Imports Microsoft.Reporting.WinForms
Imports System.Configuration
Imports System.Data.SqlClient
Public Class IncomingCashReport

      Private Sub txtEndDate_Leave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtEndDate.Leave
        Dim connString As String
        connString = ConfigurationManager.ConnectionStrings("ADSOAccountsSoftware.My.MySettings.SilaaBackupConnectionString").ConnectionString
        Dim connection As New SqlConnection
        Dim cmd As New SqlCommand
        Dim reader As SqlDataReader
        Dim ds As DataSet
        ds = New SilaaBackupDataSet
        Try
            connection.ConnectionString = connString
            connection.Open()

            cmd.Connection = connection
            cmd.CommandType = CommandType.Text
            cmd.CommandText = "Select * From AllInvoices where convert(varchar(10),DateD,101)>=@pStartDate and Convert(varchar(10),DateD,101)<=@pEndDate and Type = 'I' and Cash = 'C'"


            Dim txnStartDate As New Date(txtStartDate.Value.Year, txtStartDate.Value.Month, txtStartDate.Value.Day, 0, 0, 0)
            Dim txnEndDate As New Date(txtEndDate.Value.Year, txtEndDate.Value.Month, txtEndDate.Value.Day, 23, 59, 59)


            cmd.Parameters.AddWithValue("@pStartDate", txnStartDate)
            cmd.Parameters.AddWithValue("@pEndDate", txnEndDate)

            reader = cmd.ExecuteReader()
            ds.Tables(0).Load(reader)

            reader.Close()
            connection.Close()

            Dim rds As New ReportDataSource
            rds.Name = "SilaaBackupDataSet_AllInvoices"

            rds.Value = ds.Tables(0)

            'DataGridView1.DataSource = ds.Tables(0)

            'ReportViewer1.Reset()
            ReportViewer1.ProcessingMode = ProcessingMode.Local
            ReportViewer1.LocalReport.ReportPath = ConfigurationManager.AppSettings("ReportPath") + "\IncomingReport\Incoming Daily Cash Report.rdlc"
            ReportViewer1.LocalReport.DataSources.Clear()
            ReportViewer1.LocalReport.DataSources.Add(rds)
            ReportViewer1.LocalReport.Refresh()
            ReportViewer1.Refresh()
            Me.ReportViewer1.RefreshReport()
            Me.Refresh()

        Catch ex As Exception



        End Try
        ReportViewer1.Visible = True
        'GroupBox1.Hide()
    End Sub

i need to view report ONE Customer with Dates how i dnt knw plz help me & guide me

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.