Add additional text to a text component at runtime

Stimulsoft Reports.NET discussion
Post Reply
vorauler
Posts: 71
Joined: Wed Jul 15, 2009 1:20 am

Add additional text to a text component at runtime

Post by vorauler »

Hello

I want add additional text to a existent text component at runtime. Something like this

Code: Select all

this.txtPhase1Q1.Text += System.Environment.NewLine + Insurant.Phase1YesNoText1;
If have tried the above and this

Code: Select all

this.txtPhase1Q1.TextValue = this.txtPhase1Q1.Text.Value + System.Environment.NewLine + Insurant.Phase1YesNoText1;
Can give you me a hint, please.

Thank you
Ralf
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Add additional text to a text component at runtime

Post by HighAley »

Hello, Ralf.

Could you describe your issue more detailed with samples?
When do you need to change it and on what condition?

Thank you.
vorauler
Posts: 71
Joined: Wed Jul 15, 2009 1:20 am

Re: Add additional text to a text component at runtime

Post by vorauler »

Hello

I have a report with about 35 text components. Each of them has a predefined text, these text will be expanded at runtime with some informations from the database.
I know that I can define a handler for each text component but if it possible I want a shorter way.

Thanks
Ralf
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Add additional text to a text component at runtime

Post by HighAley »

Hello, Ralf.

You could use any expression in text component. You don't need to use handler. Just write next expression in Text Editor:

Code: Select all

Company: {Customers.CompanyName}
Thank you
vorauler
Posts: 71
Joined: Wed Jul 15, 2009 1:20 am

Re: Add additional text to a text component at runtime

Post by vorauler »

Hello

Yes, I know this. But if I could do this by code, I would faster as if I do this with the designer.

Ralf
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Add additional text to a text component at runtime

Post by HighAley »

Hello, Ralf.

Could you specify in what event do you want to do this or at what moment?
Could you describe your task more detailed?

Thank you.
Post Reply