请教:c#做了个报表,但在进入crystalReportViewer界面时按“确定”,没有出格式报表。而是弹出“数据库登陆”提示框。??? c#做了个报表,但在进入crystalReportViewer界面时按“确定”,没有出格式报表。而是弹出“数据库登陆”提示框。要求输入用户ID和密码。但输入了SQl2005 的sa和密码后提示不能进入。不知为何。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 有 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); ; //显示满足条件的报表信息 } 如何用C#做 当关闭正在打开的word文件的同时删除这个word文件 办公自动化怎么实现网上签字的真实性 怎样为SpeechSynthesizer朗读文件设置进度条并且显示…… 请问关于组件性能问题 命名空间问题 窗体与窗体之间切换的时候如何才能不会闪动?(C#) 一般问题 它已经被别的用户以独占方式打开,或没有查看数据的权限 VS2005测试版已过期, 如何才能在同一机器上再安装? 请问如何使ImageButton控件的鼠标光标变成手形的? ZedGraph 控件 Y轴的问题 winform小问题,解决马上结贴!!
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); ; //显示满足条件的报表信息
}