how to change text value by code in vb

Stimulsoft Reports.NET discussion
Post Reply
redahashem
Posts: 7
Joined: Wed Sep 16, 2009 9:41 am
Location: egypt

how to change text value by code in vb

Post by redahashem »

i make report put PageHeader and put text1 on PageHeader an want to change the text1 value
i use this code and give me error

CType(StiReport1.Pages("Page1").Components("Text1"), Stimulsoft.Report.Components.StiText).Text.Value = "micro soft"
-----------------------------------------------------
i want to know how can i call the text or Image or any control puting on PageHeader , PageFooter,ReportTitle and change the values or Image .Image by code


thank u 4 help
:feelgood: :feelgood: :feelgood: :feelgood: :feelgood:
redahashem
Posts: 7
Joined: Wed Sep 16, 2009 9:41 am
Location: egypt

how to change text value by code in vb

Post by redahashem »

pl we need the answer
:feelgood: :feelgood: :feelgood:
redahashem
Posts: 7
Joined: Wed Sep 16, 2009 9:41 am
Location: egypt

how to change text value by code in vb

Post by redahashem »

redahashem wrote:i make report put PageHeader and put text1 on PageHeader an want to change the text1 value
i use this code and give me error

CType(StiReport1.Pages("Page1").Components("Text1"), Stimulsoft.Report.Components.StiText).Text.Value = "micro soft"
-----------------------------------------------------
i want to know how can i call the text or Image or any control puting on PageHeader , PageFooter,ReportTitle and change the values or Image .Image by code


thank u 4 help
:feelgood: :feelgood: :feelgood: :feelgood: :feelgood:
Jan
Posts: 1265
Joined: Thu Feb 19, 2009 8:19 am

how to change text value by code in vb

Post by Jan »

Hello,
redahashem wrote:i make report put PageHeader and put text1 on PageHeader an want to change the text1 value
i use this code and give me error

CType(StiReport1.Pages("Page1").Components("Text1"), Stimulsoft.Report.Components.StiText).Text.Value = "micro soft"
-----------------------------------------------------
i want to know how can i call the text or Image or any control puting on PageHeader , PageFooter,ReportTitle and change the values or Image .Image by code
Component Text1 placed on PageHeader band and PageHeader band placed on page. Your code try to get Text1 component from page, but you need get it from PageHeader band. You should call method GetComponents() instead direct accesing to Components collection of page.

Thank you.
redahashem
Posts: 7
Joined: Wed Sep 16, 2009 9:41 am
Location: egypt

how to change text value by code in vb

Post by redahashem »

Jan wrote:Hello,
redahashem wrote:i make report put PageHeader and put text1 on PageHeader an want to change the text1 value
i use this code and give me error

CType(StiReport1.Pages("Page1").Components("Text1"), Stimulsoft.Report.Components.StiText).Text.Value = "micro soft"
-----------------------------------------------------
i want to know how can i call the text or Image or any control puting on PageHeader , PageFooter,ReportTitle and change the values or Image .Image by code
Component Text1 placed on PageHeader band and PageHeader band placed on page. Your code try to get Text1 component from page, but you need get it from PageHeader band. You should call method GetComponents() instead direct accesing to Components collection of page.

Thank you.


thank you so much it works well
:biggrin: :biggrin: :biggrin: :biggrin: :biggrin: :biggrin:
:biggrin: :biggrin: :biggrin: :biggrin: :biggrin:
:biggrin: :biggrin: :biggrin: :biggrin:
:biggrin: :biggrin: :biggrin:
:biggrin: :biggrin:
:biggrin:
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

how to change text value by code in vb

Post by Andrew »

Perfect! :biggrin:
Post Reply