4
votes

I'am new to using crystal report in C#.

I want to pass a combobox selected value to crystal report textbox using c# windows form . For making an heading of the report

I'am creating an blank crystal report, and then i'am adding some text object in that report.

enter image description here

now i want to pass the data from my combobox to crystal report textbox.

enter image description here

textbox name: txtheading

combobox name : cmbreporttype

I'am searching the code in googling for crystal report but i could not get anything about the value that are pass between the boxes. I found only how to start the crystal report , how to add database into crystal report. please some one help me to solve my problem or Refer me some link.

Regards:

Arthi

1

1 Answers

4
votes

Hi friend i found the answer

 TextObject TO = (TextObject)myReport.ReportDefinition.Sections["Section1"].ReportObjects["rtxtheading"];
            TO.Text = cmbreporttype.Text;

thank you Stackoverflow.