开发者

How to pass any text value from form to Crystal Report?

开发者 https://www.devze.com 2022-12-09 06:17 出处:网络
How to pass any text value from form to Crystal Report ? ex: i need to pass \"hellow\" from Form开发者_如何学运维1 to my Crystal Report , how to do it ?

How to pass any text value from form to Crystal Report ?

ex: i need to pass "hellow" from Form开发者_如何学运维1 to my Crystal Report , how to do it ?

(working in C#)

thank's in advance


Create a parameter field in Crystal. You can set its value via the parameters collection at run-time.


CrystReport1 plc = new CrystReport1();
plc.DataDefinition.FormulaFields["Formula Fild Name*"].Text = "" + textBox1.Text + "";


CrystReport1 plc = new CrystReport1();
plc.DataDefinition.FormulaFields["Formula Fild Name*"].Text = " '" + textBox1.Text + "'";


     ReportDocument dailyIssueDocument=new ReportDocument();
   var fD = dailyIssueDocument.ReportDefinition.ReportObjects["fTextBox"] as TextObject;// fTextBox is a Text object that i take to my report for showing form select date
   if (fD != null){
       fD.Text = fDate;//This is Date field that comes from  form text box
}
0

精彩评论

暂无评论...
验证码 换一张
取 消