private void WindowsFormsHost_Loaded(object sender, RoutedEventArgs e)
        {
            ReportDataSource      reportDataSource = new ReportDataSource();
            Reactions_prodDataSet dataset          = new Reactions_prodDataSet();

            dataset.BeginInit();
            reportDataSource.Name  = "AnalystIDReport"; // Name of the DataSet we set in .rdlc
            reportDataSource.Value = dataset.AspNetUsers;
            this._reportViewer.LocalReport.DataSources.Add(reportDataSource);
            this._reportViewer.LocalReport.ReportEmbeddedResource = "Client.RDLC_Reports.AnalystIDReport.rdlc";

            dataset.EndInit();
            //fill data into adventureWorksDataSet
            Reactions_prodDataSetTableAdapters.AspNetUsersTableAdapter tableAdapter = new Reactions_prodDataSetTableAdapters.AspNetUsersTableAdapter();
            tableAdapter.ClearBeforeFill = true;
            tableAdapter.Fill(dataset.AspNetUsers);
            List <ReportParameter> parameters = new List <ReportParameter>();
            ReportParameter        parameter  = new ReportParameter();

            parameter.Name = "UserName";
            parameter.Values.Add("ramu.ankam");
            //Add parameter
            parameters.Add(parameter);
            //Set the parameter collection
            _reportViewer.LocalReport.SetParameters(parameters);
            _reportViewer.RefreshReport();
        }
예제 #2
0
        private void WindowsFormsHost_Loaded(object sender, RoutedEventArgs e)
        {
            ReportDataSource      reportDataSource = new ReportDataSource();
            Reactions_prodDataSet dataset          = new Reactions_prodDataSet();

            dataset.BeginInit();
            reportDataSource.Name  = "DailyStatusReport"; // Name of the DataSet we set in .rdlc
            reportDataSource.Value = dataset.AspNetUsers;
            this._reportViewer.LocalReport.DataSources.Add(reportDataSource);
            this._reportViewer.LocalReport.ReportEmbeddedResource = "Client.RDLC_Reports.DailyStatusReport.rdlc";
            dataset.EndInit();
            //fill data into adventureWorksDataSet
            Reactions_prodDataSetTableAdapters.AspNetUsersTableAdapter tableAdapter = new Reactions_prodDataSetTableAdapters.AspNetUsersTableAdapter();
            tableAdapter.ClearBeforeFill = true;
            tableAdapter.Fill(dataset.AspNetUsers);
            _reportViewer.RefreshReport();
        }