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
Panel in StiReport Designer
Panel in StiReport Designer
Hello,
Can you please send us a simple test project, which reproduce the issue?
Thank you.
Can you please send us a simple test project, which reproduce the issue?
Thank you.
Panel in StiReport Designer
A simple test project is attachedAleksey wrote:Hello,
Can you please send us a simple test project, which reproduce the issue?
Thank you.
Thanks.
- Attachments
-
- 783.WindowsFormsApplication1.zip
- (66.26 KiB) Downloaded 351 times
Panel in StiReport Designer
Hello,
You can use the following code:
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.
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;
((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.
Panel in StiReport Designer
Many thanks for your kind assistance in this respect.Aleksey wrote:Hello,
You can use the following code:insteadCode: 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;
((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.
Panel in StiReport Designer
Hello,
We are always glad to help you!
Let us know if you need any additional help.
Thank you.
We are always glad to help you!
Let us know if you need any additional help.
Thank you.