// 事件:“打印按钮”点击事件 private void btnPrint_Click(object sender, EventArgs e) { ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); long planId = 0; if (dgvOverall.SelectedRows.Count > 0) { planId = Convert.ToInt64(dgvOverall.SelectedRows[0].Cells["id"].Value.ToString()); } reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.SparePartStockPlanDataSetTableAdapters.basicInfoTableAdapter", "basicInfo", null)); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.SparePartStockPlanDataSetTableAdapters.sparePartStockPlanTableAdapter", "sparePartStockPlan", new object[] { planId })); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.SparePartStockPlanDataSetTableAdapters.sparePartStockPlanDetailTableAdapter", "sparePartStockPlanDetail", new object[] { planId })); reportData.DataSetName = "DasherStation.dataSet.SparePartStockPlanDataSet"; reportData.ReportName = "DasherStation.Report.SparePartStockPlanReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); }
// 事件:“打印按钮”点击事件,报表打印 private void btnPrint_Click(object sender, EventArgs e) { ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); long uId = 0; if (dgvUseOverall.SelectedRows.Count > 0) { uId = Convert.ToInt64(dgvUseOverall.SelectedRows[0].Cells["id"].Value.ToString()); } reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.EquipmentUseDataSetTableAdapters.basicInfoTableAdapter", "basicInfo", null)); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.EquipmentUseDataSetTableAdapters.equipmentUseTableAdapter", "equipmentUse", new object[] { uId })); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.EquipmentUseDataSetTableAdapters.equipmentTableAdapter", "equipment", new object[] { uId })); reportData.DataSetName = "DasherStation.dataSet.EquipmentUseDataSet"; reportData.ReportName = "DasherStation.Report.EquipmentUseReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); }
private void btn_PrintG_Click(object sender, EventArgs e) { if (dgvG.SelectedRows.Count > 0) { long id = long.Parse(dgvG.SelectedRows[0].Cells[0].Value.ToString()); foreach (DataGridViewRow dr in dgvG.SelectedRows) { dr.Cells[0].Value.ToString(); } ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.ProportionGDataSetTableAdapters.proportionTableAdapter", "proportion", new object[] { id })); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.ProportionGDataSetTableAdapters.proportionDetailTableAdapter", "proportionDetail", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.ProportionGDataSet"; reportData.ReportName = "DasherStation.Report.ProportionGReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }
private void btn_PrintMulit_Click(object sender, EventArgs e) { string id; if (checkBox1.Checked) { comboBox1.Text = ""; } if (!string.IsNullOrEmpty(comboBox1.Text.Trim())) { id = comboBox1.Text.Trim(); } else { id = ""; } ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.PersonalInfoDetailDataSetTableAdapters.personnelInfoTableAdapter", "personnelInfo", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.PersonalInfoDetailDataSet"; reportData.ReportName = "DasherStation.Report.PersonalInfoDetailReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); }
/// <summary> /// 打印改性沥青生产记录 /// </summary> /// <param name="id">记录ID</param> /// <param name="pid">生产配合比编号</param> public void PrintRecordRecordGBitumen(long id, long pid) { ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.produceTableAdapters.restructureAsphaltumProduceLogTableAdapter", "restructureAsphaltumProduceLog", new object[] { id })); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.produceTableAdapters.proportionTableAdapter", "proportion", new object[] { pid })); reportData.DataSetName = "DasherStation.dataSet.produce"; reportData.ReportName = "DasherStation.ReportDistrict.produceReport.ModifiedAsphaltProduceRecords.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); }
private void btnPrintAll_Click_1(object sender, EventArgs e) { ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.ResourceConsumeDataSetTableAdapters.resourceConsumeTableAdapter", "resourceConsume", null)); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.ResourceConsumeDataSetTableAdapters.basicInfoTableAdapter", "basicInfo", null)); reportData.DataSetName = "DasherStation.dataSet.ResourceConsumeDataSet"; reportData.ReportName = "DasherStation.Report.ResourceConsumeReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); }
/// <summary> /// 打印拌合料生产记录 /// </summary> /// <param name="id">记录ID</param> /// <param name="ppid">生产配合比编号</param> /// <param name="tpid">目标配合比ID</param> public void PrintRecordMix(long id, long ppid, long tpid) { ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.produceTableAdapters.mixtureProduceLogTableAdapter", "mixtureProduceLog", new object[] { id })); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.produceTableAdapters.produceProportionTableAdapter", "produceProportion", new object[] { ppid })); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.produceTableAdapters.targetProportionTableAdapter", "targetProportion", new object[] { tpid })); reportData.DataSetName = "DasherStation.dataSet.produce"; reportData.ReportName = "DasherStation.ReportDistrict.produceReport.MixtureProduceRecords.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); }
private void btn_print_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { long id = long.Parse(dataGridView1.SelectedRows[0].Cells["htid"].Value.ToString()); ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.stock.StockDataSetTableAdapters.indentTableAdapter", "indent", new object[] { id })); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.stock.StockDataSetTableAdapters.stockContractTableAdapter", "stockContract", new object[] { id })); reportData.DataSetName = "DasherStation.stock.StockDataSet"; reportData.ReportName = "DasherStation.stock.Report.stockContract.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }
private void btn_PrintG_Click(object sender, EventArgs e) { if (PSClass.Id != 0) { long id = long.Parse((PSClass.Id).ToString()); ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.ProportionGSendDataSetTableAdapters.sendProportionTableAdapter", "sendProportion", new object[] { id })); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.ProportionGSendDataSetTableAdapters.proportionDetailTableAdapter", "proportionDetail", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.ProportionGSendDataSet"; reportData.ReportName = "DasherStation.Report.ProportionGSendReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }
/// <summary> /// 打印沥青再加温记录 /// </summary> /// <param name="start">开始时间</param> /// <param name="end">结束时间</param> public void PrintBitumenWarm(DateTime start, DateTime end) { ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.produceTableAdapters.againCalefactionProduceLogTableAdapter", "againCalefactionProduceLog", new object[] { start, end })); reportData.DataSetName = "DasherStation.dataSet.produce"; reportData.ReportName = "DasherStation.ReportDistrict.produceReport.HeatingAsphaltProduceRecords.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); }
private void btn_Print_Click(object sender, EventArgs e) { if (dgvDetail.SelectedRows.Count > 0) { string id = dgvDetail.SelectedRows[0].Cells["no"].Value.ToString(); ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.EquipmentServiceDataSetTableAdapters.equipmentServiceTableAdapter", "equipmentService", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.EquipmentServiceDataSet"; reportData.ReportName = "DasherStation.Report.EquipmentServiceReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }
private void btn_PrintP_Click(object sender, EventArgs e) { if (dgvMaterialTestAccount.Rows.Count > 0) { DateTime id = dateTimePicker1.Value; ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.ProductTestAccountDataSetTableAdapters.productTestAccountTableAdapter", "productTestAccount", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.ProductTestAccountDataSet"; reportData.ReportName = "DasherStation.Report.ProductTestAccountReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }
private void btn_Print_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(dtpCheckDate.Value.ToString())) { decimal id = decimal.Parse(dtpCheckDate.Value.ToString().Substring(0, 4)); ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.ExaminationEquipmentDetailDataSetTableAdapters.experimentationEquipmentInformationTableAdapter", "experimentationEquipmentInformation", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.ExaminationEquipmentDetailDataSet"; reportData.ReportName = "DasherStation.Report.ExaminationEquipmentDetailReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }
private void btn_PrintSingle_Click(object sender, EventArgs e) { if (dtgList.SelectedRows.Count > 0) { string id = dtgList.SelectedRows[0].Cells[2].Value.ToString(); ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.PersonalInfoDataSetTableAdapters.personnelInfoTableAdapter", "personnelInfo", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.PersonalInfoDataSet"; reportData.ReportName = "DasherStation.Report.PersonalInfoReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }
private void btn_Print_Click(object sender, EventArgs e) { if (dgvInfo.SelectedRows.Count > 0) { long id = long.Parse(dgvInfo.SelectedRows[0].Cells["id"].Value.ToString()); ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.ClaimSparePartBillDataSetTableAdapters.claimSparePartBillTableAdapter", "claimSparePartBill", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.ClaimSparePartBillDataSet"; reportData.ReportName = "DasherStation.Report.ClaimSparePartBillReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }
private void button6_Click(object sender, EventArgs e) { if (dgv_Consume2.SelectedRows.Count > 0) { long id = long.Parse(dgv_Consume2.SelectedRows[0].Cells[0].Value.ToString()); ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.RebuildAsphaltConsumeDailyStatisticsDataSetTableAdapters.rebuildAsphaltConsumeDailyStatisticsTableAdapter", "rebuildAsphaltConsumeDailyStatistics", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.RebuildAsphaltConsumeDailyStatisticsDataSet"; reportData.ReportName = "DasherStation.Report.RebuildAsphaltConsumeDailyStatisticsReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }
private void TSMDetail_Click(object sender, EventArgs e) { // 打印销售核算单 if (dgvSettlement.SelectedRows.Count > 0) { long id = long.Parse(dgvSettlement.SelectedRows[0].Cells[0].Value.ToString()); ReportHelper reportServer = new ReportHelper(); ReportData reportData = new ReportData(); List <ReportSource> reportSourceList = new List <ReportSource>(); reportSourceList.Add(reportServer.CreatReportSource("DasherStation.dataSet.SellProductSettlementDataSetTableAdapters.sellProductSettlementTableAdapter", "sellProductSettlement", new object[] { id })); reportData.DataSetName = "DasherStation.dataSet.SellProductSettlementDataSet"; reportData.ReportName = "DasherStation.Report.SellProductSettlementReport.rdlc"; reportData.ReportSourceList = reportSourceList; reportServer.ShowReport(reportData); } }