示例#1
0
    protected void btnsearch_Click(object sender, EventArgs e)
    {
        if (Drp_shop.SelectedValue.ToString() != "0")
        {
            if (Drp_Style.SelectedValue.ToString() == "1")
            {
                MembersLabel report = new MembersLabel();
                string       search = Drp_shop.SelectedItem.Text;
                if (Drp_shop.SelectedValue.ToString() != "")
                {
                    Telerik.Reporting.Filter filter1 = new Telerik.Reporting.Filter();

                    filter1.Operator   = Telerik.Reporting.FilterOperator.Equal;
                    filter1.Expression = "=Fields.Shop";
                    filter1.Value      = search;
                    report.Filters.Add(filter1);
                }
                ReportViewer1.Visible = true;
                ReportViewer1.Report  = report;
            }
            else if (Drp_Style.SelectedValue.ToString() == "2")
            {
                MembersLabelMin report = new MembersLabelMin();
                string          search = Drp_shop.SelectedItem.Text;
                if (Drp_shop.SelectedValue.ToString() != "")
                {
                    Telerik.Reporting.Filter filter1 = new Telerik.Reporting.Filter();

                    filter1.Operator   = Telerik.Reporting.FilterOperator.Equal;
                    filter1.Expression = "=Fields.Shop";
                    filter1.Value      = search;

                    report.Filters.Add(filter1);
                }
                ReportViewer1.Visible = true;
                ReportViewer1.Report  = report;
            }
        }
    }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (radCheckBox1.Checked == true && radCheckBox2.Checked == true && radCheckBox4.Checked == true)
            {
                ReportPendaftaran        pembayaran = new ReportPendaftaran();
                Telerik.Reporting.Filter filter1    = new Telerik.Reporting.Filter();
                Telerik.Reporting.Filter filter2    = new Telerik.Reporting.Filter();
                Telerik.Reporting.Filter filter3    = new Telerik.Reporting.Filter();
                Telerik.Reporting.Filter filter4    = new Telerik.Reporting.Filter();


                filter1.Expression = "=Fields.tanggal";
                filter1.Operator   = Telerik.Reporting.FilterOperator.GreaterOrEqual;
                filter1.Value      = "" + radDateTimePicker1.Value.Date + "";
                filter2.Expression = "=Fields.tanggal";
                filter2.Operator   = Telerik.Reporting.FilterOperator.LessOrEqual;
                filter2.Value      = "" + radDateTimePicker2.Value.Date + "";
                filter3.Expression = "=Fields.kelas";
                filter3.Operator   = Telerik.Reporting.FilterOperator.Equal;
                filter3.Value      = "" + comboBox1.Text + "";
                filter3.Expression = "=Fields.jenis";
                filter3.Operator   = Telerik.Reporting.FilterOperator.Equal;
                filter3.Value      = "" + comboBox2.Text + "";

                pembayaran.Filters.Add(filter1);
                pembayaran.Filters.Add(filter2);
                pembayaran.Filters.Add(filter3);
                pembayaran.Filters.Add(filter4);

                reportViewer1.ReportSource = pembayaran;
                reportViewer1.RefreshReport();
            }
            else if (radCheckBox1.Checked == true && radCheckBox2.Checked == true)
            {
                ReportPendaftaran        pembayaran = new ReportPendaftaran();
                Telerik.Reporting.Filter filter1    = new Telerik.Reporting.Filter();
                Telerik.Reporting.Filter filter2    = new Telerik.Reporting.Filter();
                Telerik.Reporting.Filter filter3    = new Telerik.Reporting.Filter();

                filter1.Expression = "=Fields.tanggal";
                filter1.Operator   = Telerik.Reporting.FilterOperator.GreaterOrEqual;
                filter1.Value      = "" + radDateTimePicker1.Value.Date + "";
                filter2.Expression = "=Fields.tanggal";
                filter2.Operator   = Telerik.Reporting.FilterOperator.LessOrEqual;
                filter2.Value      = "" + radDateTimePicker2.Value.Date + "";
                filter3.Expression = "=Fields.kelas";
                filter3.Operator   = Telerik.Reporting.FilterOperator.Equal;
                filter3.Value      = "" + comboBox1.Text + "";

                pembayaran.Filters.Add(filter1);
                pembayaran.Filters.Add(filter2);
                pembayaran.Filters.Add(filter3);
                reportViewer1.ReportSource = pembayaran;
                reportViewer1.RefreshReport();
            }
            else if (radCheckBox4.Checked == true && radCheckBox1.Checked == true)
            {
                ReportPendaftaran        pembayaran = new ReportPendaftaran();
                Telerik.Reporting.Filter filter1    = new Telerik.Reporting.Filter();
                Telerik.Reporting.Filter filter2    = new Telerik.Reporting.Filter();

                filter1.Expression = "=Fields.kelas";
                filter1.Operator   = Telerik.Reporting.FilterOperator.Equal;
                filter1.Value      = "" + comboBox1.Text + "";

                filter2.Expression = "=Fields.jenis";
                filter2.Operator   = Telerik.Reporting.FilterOperator.Like;
                filter2.Value      = "" + comboBox2.Text + "";

                pembayaran.Filters.Add(filter1);
                pembayaran.Filters.Add(filter2);
                reportViewer1.ReportSource = pembayaran;
                reportViewer1.RefreshReport();
            }
            else if (radCheckBox1.Checked == true)
            {
                ReportPendaftaran        pembayaran = new ReportPendaftaran();
                Telerik.Reporting.Filter filter1    = new Telerik.Reporting.Filter();

                filter1.Expression = "=Fields.kelas";
                filter1.Operator   = Telerik.Reporting.FilterOperator.Equal;
                filter1.Value      = "" + comboBox1.Text + "";

                pembayaran.Filters.Add(filter1);
                reportViewer1.ReportSource = pembayaran;
                reportViewer1.RefreshReport();
            }
            else if (radCheckBox3.Checked == true)
            {
                ReportPendaftaran        pembayaran = new ReportPendaftaran();
                Telerik.Reporting.Filter filter1    = new Telerik.Reporting.Filter();

                filter1.Expression = "=Fields.nama";
                filter1.Operator   = Telerik.Reporting.FilterOperator.Like;
                filter1.Value      = "%" + textBox1.Text + "%";

                pembayaran.Filters.Add(filter1);
                reportViewer1.ReportSource = pembayaran;
                reportViewer1.RefreshReport();
            }
            else if (radCheckBox4.Checked == true)
            {
                ReportPendaftaran        pembayaran = new ReportPendaftaran();
                Telerik.Reporting.Filter filter1    = new Telerik.Reporting.Filter();

                filter1.Expression = "=Fields.jenis";
                filter1.Operator   = Telerik.Reporting.FilterOperator.Like;
                filter1.Value      = "" + comboBox2.Text + "";

                pembayaran.Filters.Add(filter1);
                reportViewer1.ReportSource = pembayaran;
                reportViewer1.RefreshReport();
            }
            else if (radCheckBox2.Checked == true)
            {
                ReportPendaftaran        pembayaran = new ReportPendaftaran();
                Telerik.Reporting.Filter filter1    = new Telerik.Reporting.Filter();
                Telerik.Reporting.Filter filter2    = new Telerik.Reporting.Filter();


                filter1.Expression = "=Fields.tanggal";
                filter1.Operator   = Telerik.Reporting.FilterOperator.GreaterOrEqual;
                filter1.Value      = "" + radDateTimePicker1.Value.Date + "";
                filter2.Expression = "=Fields.tanggal";
                filter2.Operator   = Telerik.Reporting.FilterOperator.LessOrEqual;
                filter2.Value      = "" + radDateTimePicker2.Value.Date + "";


                pembayaran.Filters.Add(filter1);
                pembayaran.Filters.Add(filter2);


                reportViewer1.ReportSource = pembayaran;
                reportViewer1.RefreshReport();
            }

            else
            {
                ReportPendaftaran pembayaran = new ReportPendaftaran();
                reportViewer1.ReportSource = pembayaran;
                reportViewer1.RefreshReport();
            }
        }