Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            sels_partener_rep rpt = new sels_partener_rep();

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void sels_of_part_lnklbl_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            try
            {
                repoerts_form     rp_form    = new repoerts_form();
                ParameterFields   pars       = new ParameterFields();
                sels_partener_rep sel_par_rp = new sels_partener_rep();

                ParameterField         part_id_par = new ParameterField();
                ParameterDiscreteValue part_id_dis = new ParameterDiscreteValue();
                part_id_par.Name = "parte_id";
                if (parte_cmbx.Text != "")
                {
                    part_id_dis.Value = parte_cmbx.SelectedValue.ToString();
                }
                else
                {
                    part_id_dis.Value = 0;
                }
                part_id_par.CurrentValues.Add(part_id_dis);
                pars.Add(part_id_par);

                ParameterField         tas_id_par = new ParameterField();
                ParameterDiscreteValue tas_id_dis = new ParameterDiscreteValue();
                tas_id_par.Name = "tasneef_id";
                if (tasneef_cmbx.SelectedIndex >= 0)
                {
                    tas_id_dis.Value = tasneef_cmbx.SelectedValue.ToString();
                }
                else
                {
                    tas_id_dis.Value = 0;
                }
                tas_id_par.CurrentValues.Add(tas_id_dis);
                pars.Add(tas_id_par);


                ParameterField         type_s_par = new ParameterField();
                ParameterDiscreteValue type_s_dis = new ParameterDiscreteValue();
                type_s_par.Name = "type_of_serach";
                if (sels_part_about_cmbx.SelectedIndex == 0)
                {
                    type_s_dis.Value = 0;
                }
                else if (sels_part_about_cmbx.SelectedIndex == 1)
                {
                    type_s_dis.Value = 1;
                }
                else
                {
                    type_s_dis.Value = 2;
                }
                type_s_par.CurrentValues.Add(type_s_dis);
                pars.Add(type_s_par);

                ParameterField         start_field_par = new ParameterField();
                ParameterDiscreteValue start_dis       = new ParameterDiscreteValue();
                start_field_par.Name = "start_date";
                start_dis.Value      = sels_parte_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      = sels_part_end_date.Text;
                end_field_par.CurrentValues.Add(end_dis);
                pars.Add(end_field_par);

                ParameterField         comp_field_par = new ParameterField();
                ParameterDiscreteValue comp_dis       = new ParameterDiscreteValue();
                comp_field_par.Name = "compant_par";
                if (company_cmbx.Text.Trim() != "")
                {
                    comp_dis.Value = company_cmbx.SelectedValue.ToString();
                }
                else
                {
                    comp_dis.Value = "0";
                }
                comp_field_par.CurrentValues.Add(comp_dis);
                pars.Add(comp_field_par);
                rp_form.rep_crst.ReportSource = sel_par_rp;

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