public void Fill(object sender, RoutedEventArgs e) { this.reportViewer.Reset(); Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource(); Data.ProductDS ProductDS = new Data.ProductDS(); ProductDS.BeginInit(); Data.ProductDSTableAdapters.InventorySummaryTableAdapter InventorySummaryTableAdapter = new Data.ProductDSTableAdapters.InventorySummaryTableAdapter(); DataTable dt = new DataTable(); if (ReportPanel.Branch != null) { dt = InventorySummaryTableAdapter.GetDataByBranch(ReportPanel.StartDate, ReportPanel.EndDate, CurrentSession.Id_Company, ReportPanel.Branch.id_branch); } else { dt = InventorySummaryTableAdapter.GetDataByDate(ReportPanel.StartDate, ReportPanel.EndDate, CurrentSession.Id_Company); } reportDataSource1.Name = "InventorySummary"; //Name of the report dataset in our .RDLC file reportDataSource1.Value = dt; //SalesDB.SalesByDate; this.reportViewer.LocalReport.DataSources.Add(reportDataSource1); this.reportViewer.LocalReport.ReportEmbeddedResource = "Cognitivo.Reporting.Reports.InventorySummary.rdlc"; ProductDS.EndInit(); this.reportViewer.Refresh(); this.reportViewer.RefreshReport(); }
public void Fill(object sender, EventArgs e) { int id_item = sbxItem.ItemID; if (id_item > 0) { this.reportViewer.Reset(); Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource(); Data.ProductDS ProductDS = new Data.ProductDS(); ProductDS.BeginInit(); Data.ProductDSTableAdapters.stockflowTableAdapter stockflowTableAdapter = new Data.ProductDSTableAdapters.stockflowTableAdapter(); //fill data stockflowTableAdapter.ClearBeforeFill = true; DataTable dt = stockflowTableAdapter.GetData(id_item, CurrentSession.Id_Company); reportDataSource1.Name = "StockFlow"; //Name of the report dataset in our .RDLC file reportDataSource1.Value = dt; this.reportViewer.LocalReport.DataSources.Add(reportDataSource1); this.reportViewer.LocalReport.ReportEmbeddedResource = "Cognitivo.Reporting.Reports.StockFlow.rdlc"; ProductDS.EndInit(); this.reportViewer.Refresh(); this.reportViewer.RefreshReport(); } }
public void Fill(object sender, RoutedEventArgs e) { this.reportViewer.Reset(); Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource(); Data.ProductDS ProductDS = new Data.ProductDS(); ProductDS.BeginInit(); Data.ProductDSTableAdapters.PriceListTableAdapter PriceListTableAdapter = new Data.ProductDSTableAdapters.PriceListTableAdapter(); DataTable dt = new DataTable(); dt = PriceListTableAdapter.GetDataBy(); reportDataSource1.Name = "ItemPriceList"; //Name of the report dataset in our .RDLC file reportDataSource1.Value = dt; //SalesDB.SalesByDate; this.reportViewer.LocalReport.DataSources.Add(reportDataSource1); this.reportViewer.LocalReport.ReportEmbeddedResource = "Cognitivo.Reporting.Reports.ItemPriceList.rdlc"; ProductDS.EndInit(); this.reportViewer.Refresh(); this.reportViewer.RefreshReport(); }
public void Fill(object sender, RoutedEventArgs e) { this.reportViewer.Reset(); Microsoft.Reporting.WinForms.ReportDataSource reportDataSource1 = new Microsoft.Reporting.WinForms.ReportDataSource(); Data.ProductDS ProductDB = new Data.ProductDS(); ProductDB.BeginInit(); Data.ProductDSTableAdapters.StockFlowDimensionTableAdapter StockFlowDimensionTableAdapter = new Data.ProductDSTableAdapters.StockFlowDimensionTableAdapter(); DataTable dt = new DataTable(); if (ReportPanel.Branch != null) { dt = StockFlowDimensionTableAdapter.GetDataByBranch(CurrentSession.Id_Company, ReportPanel.Branch.id_branch, ReportPanel.StartDate, ReportPanel.EndDate); } else { dt = StockFlowDimensionTableAdapter.GetDataBy(CurrentSession.Id_Company, ReportPanel.StartDate, ReportPanel.EndDate); } //ReportParameter[] parameters = new ReportParameter[x+1]; reportDataSource1.Name = "StockFlowDimension"; //Name of the report dataset in our .RDLC file reportDataSource1.Value = dt; //SalesDB.SalesByDate; this.reportViewer.LocalReport.DataSources.Add(reportDataSource1); this.reportViewer.LocalReport.ReportEmbeddedResource = "Cognitivo.Reporting.Reports.StockFlowDimension.rdlc"; //parameters[0] = new ReportParameter("name1", value1); //parameters[0] = new ReportParameter("name1", value1); //parameters[0] = new ReportParameter("name1", value1); //parameters[0] = new ReportParameter("name1", value1); //parameters[0] = new ReportParameter("name1", value1); //this.reportViewer.LocalReport.SetParameters("EndDate", dtEndDate, false); ProductDB.EndInit(); this.reportViewer.Refresh(); this.reportViewer.RefreshReport(); }