Hi,
I have to load all the components and there value.
For eg, below is the Xml file for the report. Now I want to read NAME and TEXT.
<Components isList="true" count="6">
<Text1 Ref="14" type="Text" isKey="true">
<Name>Text1</Name>
<Page isRef="10" />
<Parent isRef="13" />
<Text>Test Name for text</Text>
<TextBrush>Black</TextBrush>
<Type>Expression</Type>
</Text1>
I am using the following code,
StiReport Report = new StiReport();
Report .Load(Path.GetFullPath(fileName));
m_GlobalFileName = name;
StiComponentsCollection collection = Report .GetComponents();
foreach (StiComponent TextComp in collection)
{
if (TextComp is StiText)
{
messagebox.show(name + "." + TextComp.Name, TextComp.Tag);
}
}
Using the TextComp.Name, I am able to get the name of the text but not able to find the property TEXT. That should return "Test Name for text"
Please let me know, how it can be done.
Thanks
How to find the text property of a textbox
-
- Posts: 1
- Joined: Mon Feb 23, 2015 9:36 am
Re: How to find the text property of a textbox
Hello.
The StiComponent class has no Text property. You should convert it to StiText.
Thank you.
The StiComponent class has no Text property. You should convert it to StiText.
Code: Select all
(TextComp as StiText).Text