Example #1
0
        private void btnFindOk_Click(object sender, EventArgs e)
        {
            string P_select = " {tb_Company.CompanyName} like '*" + this.txtName.Text + "*'";

            P_select += " and {tb_Company.CompanyDirector} like '*" + this.txtDirector.Text + "*'";
            P_select += " and {tb_Company.CompanyAddress} like '*" + this.txtAddress.Text + "*'";

            this.crystalReportViewer1.ReportSource = G_OperationWinForm.CrystalReports("CrystalCompanyReport.rpt", P_select);
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            string P_select = " {v_UserSell.Name} like '*" + this.txtEmployeeName.Text + "*'";

            P_select += " and {v_UserSell.Sex} like '*" + this.txtEmployeeSex.Text + "*'";
            P_select += " and {v_UserSell.GoodsID} like '*" + this.txtGoodsID.Text + "*'";
            P_select += " and {v_UserSell.SellID} like '*" + this.txtSellID.Text + "*'";

            this.crystalReportViewer1.ReportSource = G_OperationWinForm.CrystalReports("CrystalEmployeeSellReport.rpt", P_select);
        }
Example #3
0
        private void btnFindOk_Click(object sender, EventArgs e)
        {
            //为报表设定查询语句
            string P_selectionFormula = "{tb_User.Name} like "
                                        + "'*" + this.txtName.Text + "*' and {tb_User.Sex}='" + this.cbxSex.Items[this.cbxSex.SelectedIndex].ToString() + "'";

            P_selectionFormula += " and {tb_User.Post}='" + this.cbxPost.SelectedValue.ToString();
            P_selectionFormula += "' and {tb_User.Department}='" + this.cbxDepName.SelectedValue.ToString() + "'";

            this.crystalReportViewer1.ReportSource = G_OperationForm.CrystalReports("CrystalEmployeeReport.rpt", P_selectionFormula);;  //显示满足条件的报表信息
        }