string P_select1 = " {教师情况.SysLoginName}='" + this.listBox1.SelectedValue .ToString() + "'";
this.crystalReportViewer1.ReportSource = G_OperationWinForm.CrystalReports("CrystalReport1.rpt", P_select1);
我这么写有什么问题吗?是否还需要加入listBox1_SelectedValueChanged事件或者其他的东西?
我选的值怎么才能传递到我的参数中去?
this.crystalReportViewer1.ReportSource = G_OperationWinForm.CrystalReports("CrystalReport1.rpt", P_select1);
我这么写有什么问题吗?是否还需要加入listBox1_SelectedValueChanged事件或者其他的东西?
我选的值怎么才能传递到我的参数中去?
定义有一个公共变量(如public string str;),然后早listbox上的事件上产生事件On_valueChange事件,
在事件上添加程序语句:str=this.listbox1.text;
然后把str变量传给其他的方法。