public ReportFrom() { this.components = null; base(); this.InitializeComponent(); this._reportBll = new ReportBll(); }
private DataTable relatorioHistoricoViabilidade() { ReportBll reportBll = new ReportBll(); return(reportBll.relatorioHistoricoViabilidade(ddlStatus.SelectedValue, txtCircuito.Text, ddlEstado.SelectedValue, txtLocalidade.Text, txtBairro.Text, txtLogradouro.Text, txtDtInicio.Text, txtDtFim.Text, txtCaixa.Text)); }
private void fillReport() { ReportBll relatorioBll = new ReportBll(); gvOLT.DataSource = relatorioBll.relatorioBandaOltTotal(txtOlt.Text); gvOLT.DataBind(); }
/// <summary> /// 【导出】 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void btn_outPut_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(cboxUsers.Text)) { if (startData.Value <= endData.Value) { Dictionary <string, object> dic = new Dictionary <string, object>(); string sql = "Select * from WorkingHours where isdelete='1'"; sql += " and workername=@workername "; dic.Add("workername", DESJiaMi.Encrypt(cboxUsers.Text)); sql += " and workdate>=@workdate1"; dic.Add("workdate1", startData.Value.ToString("yyyy-MM-dd")); sql += " and workdate<=@workdate2 "; dic.Add("workdate2", endData.Value.ToString("yyyy-MM-dd")); DataTable dt = DbHelperOleDb.Query(sql + " order by workdate,starttime", dic).Tables[0]; if (dt != null && dt.Rows.Count > 0) { ReportBll reportBll = new ReportBll(); string timeLimit = startData.Value.ToString("yyyy.MM.dd") + "-" + endData.Value.ToString("yyyy.MM.dd"); reportBll.RegisterData(dt, cboxUsers.Text, timeLimit); if (reportBll.ReportExport(cboxUsers.Text + "_" + timeLimit + ".pdf")) { MessageBox.Show("工作报表生成完成!", "导出", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("工作报表生成失败!", "导出", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("该员工在当前选择的时间段内无工作信息记录,无法进行导出!!!", "导出", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("导出的“开始时间”大于“结束时间”,无法进行导出!!!", "导出", MessageBoxButtons.OK, MessageBoxIcon.Warning); } } else { MessageBox.Show("请先选择要导出的员工姓名!!!", "导出", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
private void MoneyBind(string year) { this.MoneyView.Reset(); this.MoneyView.LocalReport.Dispose(); this.MoneyView.LocalReport.DataSources.Clear(); ReportDataSource MoneyDataSource = new ReportDataSource(); MoneyDataSource.Name = "DataSet1"; ReportBll reportbll = new ReportBll(); string filepath = Server.MapPath("~/Content/Report/Money/MoneyJson.txt"); MoneyDataSource.Value = reportbll.GetMoneyBalList(filepath, year); this.MoneyView.LocalReport.ReportPath = Server.MapPath("~/Content/Report/Money/Money.rdlc"); this.MoneyView.LocalReport.DataSources.Add(MoneyDataSource); this.MoneyView.LocalReport.Refresh(); }
private void QuotationBind() { this.QuotationView.Reset(); this.QuotationView.LocalReport.Dispose(); this.QuotationView.LocalReport.DataSources.Clear(); ReportDataSource QuotationDataSource = new ReportDataSource(); QuotationDataSource.Name = "DataSet1"; ReportBll reportbll = new ReportBll(); string filepath = Server.MapPath("~/Content/Report/Quotation/QuotationJson.txt"); QuotationDataSource.Value = reportbll.GetQuotationList(filepath, ""); this.QuotationView.LocalReport.DisplayName = "报价单"; this.QuotationView.LocalReport.ReportPath = Server.MapPath("~/Content/Report/Quotation/Quotation.rdlc"); this.QuotationView.LocalReport.DataSources.Add(QuotationDataSource); this.QuotationView.LocalReport.Refresh(); }
private void BankAnalyzeBind() { this.BankAnalyzeView.Reset(); this.BankAnalyzeView.LocalReport.Dispose(); this.BankAnalyzeView.LocalReport.DataSources.Clear(); ReportDataSource BankAnalyzeDataSource = new ReportDataSource(); BankAnalyzeDataSource.Name = "DataSet1"; ReportBll reportbll = new ReportBll(); string filepath = Server.MapPath("~/Content/Report/BankAnalyze/BankAnalyzeJson.txt"); BankAnalyzeDataSource.Value = reportbll.GetBankAnalyzeList(filepath, ""); this.BankAnalyzeView.LocalReport.ReportPath = Server.MapPath("~/Content/Report/BankAnalyze/BankAnalyze.rdlc"); this.BankAnalyzeView.LocalReport.DataSources.Add(BankAnalyzeDataSource); this.BankAnalyzeView.LocalReport.Refresh(); }
private void btnOK_Click(object sender, EventArgs e) { BalanceReportDataTable balanceReportDataTable; ReportDocument reportDocument = new ReportDocument(); reportDocument.Load(string.Concat(Path.GetDirectoryName(Application.ExecutablePath), "\\BalanceReportCR.rpt")); ReportBll reportBll = new ReportBll(); DateTime @value = this.dtDate.Value; DateTime date = @value.Date; int selectedValue = (int)this.ddlAccounts.SelectedValue; string str = string.Concat(this.ddlAccounts.SelectedValue.ToString(), " | ", this.ddlAccounts.GetItemText(this.ddlAccounts.SelectedItem)); if (this.category != 0) { balanceReportDataTable = reportBll.BalanceReportByCategory(selectedValue, date); } else { balanceReportDataTable = reportBll.BalanceReportByAccount(selectedValue, date); } reportDocument.SetDataSource(balanceReportDataTable); ParameterValues parameterValue1 = new ParameterValues(); ParameterDiscreteValue parameterDiscreteValue1 = new ParameterDiscreteValue(); parameterDiscreteValue1.set_Value(str); parameterValue1.Add(parameterDiscreteValue1); reportDocument.DataDefinition.ParameterFields["account"].ApplyCurrentValues(parameterValue1); ParameterValues parameterValue2 = new ParameterValues(); ParameterDiscreteValue parameterDiscreteValue2 = new ParameterDiscreteValue(); parameterDiscreteValue2.set_Value(date); parameterValue2.Add(parameterDiscreteValue2); reportDocument.DataDefinition.ParameterFields["dtTo"].ApplyCurrentValues(parameterValue2); ReportFrom reportFrom = new ReportFrom(); reportFrom.crViewer.set_ReportSource(reportDocument); reportFrom.MdiParent = this.form1; reportFrom.Anchor = AnchorStyles.Top | AnchorStyles.Right; reportFrom.Dock = DockStyle.Fill; reportFrom.reportType = ReportType.None; reportFrom.Show(); base.Close(); base.Dispose(); }
private void exportReport() { ReportBll relatorioBll = new ReportBll(); Utility.ExportDataTableCsv(relatorioBll.relatorioGeralFacilidade(txtCircuito.Text, txtCto.Text, txtOlt.Text, ddlStatus.SelectedValue), "Facilidade GPON"); }