Panel in StiReport Designer

Stimulsoft Ultimate discussion
Post Reply
nimam2008
Posts: 8
Joined: Sun Dec 05, 2010 12:05 am
Location: india

Panel in StiReport Designer

Post by nimam2008 »

Hello

I have a problem with Panel in StiReport Designer.

When in “stiReport Designer” I place a “Text” which is named as “Text1”, with the below code I can see the entered text in “Textbox1” which exist in my program(C#),
{
((StiText)stiReport1.Pages["Page1"].Components["Text1"]).Text.Value = TextBox1.Text;

stiReport1.Show();
}

but when in “stiReport Designer” I put a “Panel” first and then transport “Text1” on it I encounter to the below error
“Object reference not set to an instance of an object.”
Pls. help me in this respect and also tell me If I put a “Table” on the “Panel” how I can display the entered text in “Textbox1” in one of the Table’s Cells.

Thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Panel in StiReport Designer

Post by Alex K. »

Hello,

Can you please send us a simple test project, which reproduce the issue?

Thank you.
nimam2008
Posts: 8
Joined: Sun Dec 05, 2010 12:05 am
Location: india

Panel in StiReport Designer

Post by nimam2008 »

Aleksey wrote:Hello,

Can you please send us a simple test project, which reproduce the issue?

Thank you.
A simple test project is attached

Thanks.
Attachments
783.WindowsFormsApplication1.zip
(66.26 KiB) Downloaded 351 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Panel in StiReport Designer

Post by Alex K. »

Hello,

You can use the following code:

Code: Select all

StiText text1 = stiReport_with_Panel.GetComponents()["Text1"] as StiText;
text1.Text.Value = textBox1.Text;

StiText table1_Cell1 = stiReport_with_Panel.GetComponents()["Table1_Cell1"] as StiText;
table1_Cell1.Text.Value = textBox1.Text;
instead
((StiText)stiReport_with_Panel.Pages["Page1"].Components["Text1"]).Text.Value = textBox1.Text;
((StiText)stiReport_without_Panel.Pages["Page1"].Components["Table1_Cell1"]).Text.Value = textBox1.Text;

Thank you.
nimam2008
Posts: 8
Joined: Sun Dec 05, 2010 12:05 am
Location: india

Panel in StiReport Designer

Post by nimam2008 »

Aleksey wrote:Hello,

You can use the following code:

Code: Select all

StiText text1 = stiReport_with_Panel.GetComponents()["Text1"] as StiText;
text1.Text.Value = textBox1.Text;

StiText table1_Cell1 = stiReport_with_Panel.GetComponents()["Table1_Cell1"] as StiText;
table1_Cell1.Text.Value = textBox1.Text;
instead
((StiText)stiReport_with_Panel.Pages["Page1"].Components["Text1"]).Text.Value = textBox1.Text;
((StiText)stiReport_without_Panel.Pages["Page1"].Components["Table1_Cell1"]).Text.Value = textBox1.Text;

Thank you.
Many thanks for your kind assistance in this respect.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Panel in StiReport Designer

Post by Alex K. »

Hello,

We are always glad to help you!
Let us know if you need any additional help.

Thank you.
Post Reply