Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            earn_partener_rp rpt = new earn_partener_rp();

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void earn_lnklbl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                try
                {
                    partener_cmbx.DisplayMember = "paretener_name";
                    partener_cmbx.ValueMember   = "partener_id";
                    string     datelastday;
                    total_earn ec = new total_earn();
                    /// datelastday = (Int32.Parse(DateTime.Now.Day.ToString()) - 1).ToString();
                    //datelastday = datelastday + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Year.ToString();
                    if (earn_all_part_rdbtn.Checked)
                    {
                        ec.EarnCalcOper(earn_start_date.Text, earn_end_date.Text, "");
                    }
                    else
                    {
                        ec.EarnCalcOper(earn_start_date.Text, earn_end_date.Text, partener_cmbx.SelectedValue.ToString());
                    }
                }
                catch (Exception ff)
                {
                    MessageBox.Show(ff.Message);
                }

                repoerts_form    rp_form = new repoerts_form();
                ParameterFields  pars    = new ParameterFields();
                earn_rp          er_rp   = new earn_rp();
                earn_partener_rp e_part  = new earn_partener_rp();

                ParameterField         start_field_par = new ParameterField();
                ParameterDiscreteValue start_dis       = new ParameterDiscreteValue();
                start_field_par.Name = "start_date";
                start_dis.Value      = earn_start_date.Text;
                start_field_par.CurrentValues.Add(start_dis);
                pars.Add(start_field_par);



                ParameterField         end_field_par = new ParameterField();
                ParameterDiscreteValue end_dis       = new ParameterDiscreteValue();
                end_field_par.Name = "end_date";
                end_dis.Value      = earn_end_date.Text;
                end_field_par.CurrentValues.Add(end_dis);
                pars.Add(end_field_par);


                if (earn_all_part_rdbtn.Checked)
                {
                    rp_form.rep_crst.ReportSource = er_rp;

                    rp_form.rep_crst.ParameterFieldInfo = pars;
                    er_rp.Refresh();
                    rp_form.ShowDialog();
                }
                else
                {
                    ParameterField         part_id_par = new ParameterField();
                    ParameterDiscreteValue part_id_dis = new ParameterDiscreteValue();
                    part_id_par.Name  = "partener_name";
                    part_id_dis.Value = partener_cmbx.Text;
                    part_id_par.CurrentValues.Add(part_id_dis);
                    pars.Add(part_id_par);
                    rp_form.rep_crst.ReportSource = e_part;

                    rp_form.rep_crst.ParameterFieldInfo = pars;
                    e_part.Refresh();
                    rp_form.ShowDialog();
                }
            }
            catch (Exception ss)
            {
                MessageBox.Show(ss.Message);
            }
        }