public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { pay_agent_period rpt = new pay_agent_period(); rpt.Site = this.Site; return(rpt); }
private void earn_lnklbl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { try { repoerts_form mor_rp_form = new repoerts_form(); pay_agent_period p_mor_rp = new pay_agent_period(); ParameterFields mor_params = new ParameterFields(); //////////mor name///////////// ParameterField mor_name_par = new ParameterField(); ParameterDiscreteValue mor_nam_dis = new ParameterDiscreteValue(); mor_nam_dis.Value = 0; mor_name_par.Name = "ag_id"; if (ag_name_cmbx.Text.Trim() != "") { mor_nam_dis.Value = ag_name_cmbx.SelectedValue.ToString(); } mor_name_par.CurrentValues.Add(mor_nam_dis); mor_params.Add(mor_name_par); /////////////////////////////////////////////////////choice//////// ParameterField choice_par = new ParameterField(); ParameterDiscreteValue choice_dis = new ParameterDiscreteValue(); choice_par.Name = "choice_par"; if (query_choice_cmbx.SelectedIndex == 0) { choice_dis.Value = 1; } else { choice_dis.Value = 0; } choice_par.CurrentValues.Add(choice_dis); mor_params.Add(choice_par); //////////////////////////////////////////////////////////////////////////////////////////////////////start date ParameterField mor_start_dat_par = new ParameterField(); ParameterDiscreteValue mor_start_dat_dis = new ParameterDiscreteValue(); mor_start_dat_par.Name = "start_date"; mor_start_dat_dis.Value = ag_start_date.Text; mor_start_dat_par.CurrentValues.Add(mor_start_dat_dis); mor_params.Add(mor_start_dat_par); ///////////////////////////////////////////////////////////end date////////////// ParameterField mor_end_dat_par = new ParameterField(); ParameterDiscreteValue mor_end_dat_dis = new ParameterDiscreteValue(); mor_end_dat_par.Name = "end_date"; mor_end_dat_dis.Value = ag_end_date.Text; mor_end_dat_par.CurrentValues.Add(mor_end_dat_dis); mor_params.Add(mor_end_dat_par); //////////////////////////////////////////////////////////////////////////////////////// mor_rp_form.rep_crst.ParameterFieldInfo = mor_params; mor_rp_form.rep_crst.ReportSource = p_mor_rp; mor_rp_form.ShowDialog(); } catch (Exception ff) { MessageBox.Show(ff.Message + " طباعة تقرير حسابات عميل"); } }