本文介绍了水晶报表过滤的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
由于必须生成一份打印录取表格,我如何才能在水晶报表中仅显示一条记录:
名称:-数据库值
类别:-数据库值
部分:-数据库值
等等....
请帮帮我!
问候,
Akkywadhwa
How can I display only one record in my crystal report as i have to generate a print a admission form:
Name :- database value
Class:- database value
Section :- database value
and so on....
Please help me!!
Regards,
Akkywadhwa
推荐答案
private void Form1_Load(object sender, EventArgs e)
{
//Instantiate a new report document
ReportDocument oDoc = new ReportDocument();
//load myCrReport
oDoc.Load(@"C:\myCrReport.rpt");
/* Create a data set and populate it with
* C:\Ressource.xml contents*/
DataSet myDataSet = new DataSet();
myDataSet.ReadXml(@"C:\Ressource.xml");
// Set the data source of the report document
oDoc.SetDataSource(myDataSet.Tables["Table"]);
//Create a query to fit the user filtering requirement
string myQuery = "{RollNo.RollNoList}= '121'";
crystalReportViewer1.SelectionFormula = myQuery;
//Set the viewer report source
crystalReportViewer1.ReportSource = oDoc;
}
这篇关于水晶报表过滤的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!