Esempio n. 1
0
        private void ReportViewer_Load(object sender, EventArgs e)
        {
            if (!_isReportViewerLoaded)
            {
                Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new
                                                                                  Microsoft.Reporting.WinForms.ReportDataSource();
                DSreport dataset = new DSreport();
                dataset.BeginInit();
                reportDataSource1.Name = "DataSet1";
                //Name of the report dataset in our .RDLC file
                reportDataSource1.Value = dataset.DataTable2;
                this.reportrecettejour.LocalReport.DataSources.Add(reportDataSource1);
                this.reportrecettejour.LocalReport.ReportPath = "../../Layouts/recettejour.rdlc";
                dataset.EndInit();
                //fill data into WpfApplication4DataSet
                DSreportTableAdapters.DataTable2TableAdapter
                    accountsTableAdapter = new
                                           DSreportTableAdapters.DataTable2TableAdapter();

                accountsTableAdapter.ClearBeforeFill = true;
                accountsTableAdapter.Fill(dataset.DataTable2);
                reportrecettejour.RefreshReport();
                _isReportViewerLoaded = true;
            }
        }
Esempio n. 2
0
        private void ReportViewer2_Load(object sender, EventArgs e)
        {
            if (!_isReportViewerLoaded2)
            {
                Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new
                                                                                  Microsoft.Reporting.WinForms.ReportDataSource();
                DSreport dataset = new DSreport();
                dataset.BeginInit();
                reportDataSource1.Name = "DataSet1";
                //Name of the report dataset in our .RDLC file
                reportDataSource1.Value = dataset.ticket_rep;
                this.reportFacture.LocalReport.DataSources.Add(reportDataSource1);
                this.reportFacture.LocalReport.ReportPath = "../../Layouts/repFacture.rdlc";
                dataset.EndInit();
                //fill data into WpfApplication4DataSet
                DSreportTableAdapters.ticket_repTableAdapter
                    facture = new
                              DSreportTableAdapters.ticket_repTableAdapter();

                facture.ClearBeforeFill = true;
                facture.Fill(dataset.ticket_rep, id);
                reportFacture.RefreshReport();
                _isReportViewerLoaded2 = true;
            }
        }