i have 4 textboxes,i want to print textboxes' content at arbitrary coordinate on paper but i don't know.I use crystal report to print!
Please help me!
Thanks so much!

>content at arbitrary coordinate on paper but i don't know.

Create four parameters, place them on different sections.

sample1.Section2.ReportObjects["param_name"].Left = 1;
 sample1.Section2.ReportObjects["param_name"].Top = 1;
 sample1.SetParameterValue("param_name", "put_value");
...

>content at arbitrary coordinate on paper but i don't know.

Create four parameters, place them on different sections.

sample1.Section2.ReportObjects["param_name"].Left = 1;
 sample1.Section2.ReportObjects["param_name"].Top = 1;
 sample1.SetParameterValue("param_name", "put_value");
...

i don't understand what's "put_value"?coordinate or textbox's content?

>content at arbitrary coordinate on paper but i don't know.

Create four parameters, place them on different sections.

sample1.Section2.ReportObjects["param_name"].Left = 1;
 sample1.Section2.ReportObjects["param_name"].Top = 1;
 sample1.SetParameterValue("param_name", "put_value");
...

i did it but it appear 1 error: "index was outside the bounds of array".I don't understand.

String s;
                
                objRpt.Section2.ReportObjects["s"].Left = 1;

                objRpt.Section2.ReportObjects["s"].Top = 1;

                objRpt.SetParameterValue("s", "txtmaso.Text");

Please help me!
Thank u!

Create four parameters (say para1,para2,para3,para4) of type string and drag & drop them on crystal report (.rpt) sections.

Write following code to push value to these parameters.

CrystalReport11.Section2.ReportObjects["para1"].Left = 1;
 CrystalReport11.Section2.ReportObjects["para1"].Top = 1;
 CrystalReport11.SetParameterValue("para1", "Hello");

 CrystalReport11.Section2.ReportObjects["para2"].Left = 270;
 CrystalReport11.Section2.ReportObjects["para2"].Top = 1;
 CrystalReport11.SetParameterValue("para2", "World");
 ....
This article has been dead for over six months. Start a new discussion instead.