how change the text HorizontalAlignment property run time

Stimulsoft Reports.NET discussion
Post Reply
fjaweihyafie
Posts: 22
Joined: Wed Feb 06, 2013 6:12 am

how change the text HorizontalAlignment property run time

Post by fjaweihyafie »

I had a columen contains value (string or number),eg:

Type Key Detail
Error Line 2:.. Error Description
Falut content ....
STATUS Added 55
STATUS Updated 10


I want to control the Details Value Text's HorizontalAlignment property depend on the Type value,such as when Type value is not STATUS Details Text HorizontalAlignment is set to "Left" ,when Type value is "STATUS" ,I need to set the Detail Text HorizontalAlignment property to "Right" ,just satisfy the rule "Number -- Right aligned".
I try to uses

Code: Select all

Text25.HorizontalAlignment = IIF(AuditEventDetails.Type == "STATUS","Right","Left")
at the Detail event " Before Print " in mrt file (the column of Details value is in Text25),but I got errors ,Can anyone help me ,thanks.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: how change the text HorizontalAlignment property run ti

Post by Alex K. »

Hello,

Please try to use the Style in Conditions for this task.

Thank you.
fjaweihyafie
Posts: 22
Joined: Wed Feb 06, 2013 6:12 am

Re: how change the text HorizontalAlignment property run ti

Post by fjaweihyafie »

I doubt about how to user the Style in Conditions , I 'm a beginner ,Thanks a lot
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how change the text HorizontalAlignment property run ti

Post by HighAley »

Hello.

Here is a demo videos how to use Conditions http://www.stimulsoft.com/en/videos?tags=conditions,net

Thank you.
fjaweihyafie
Posts: 22
Joined: Wed Feb 06, 2013 6:12 am

Re: how change the text HorizontalAlignment property run ti

Post by fjaweihyafie »

Get it ,Thanks ;-)
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: how change the text HorizontalAlignment property run ti

Post by Andrew »

Hello,

Great! Have a nice weekend!
fjaweihyafie
Posts: 22
Joined: Wed Feb 06, 2013 6:12 am

Re: how change the text HorizontalAlignment property run ti

Post by fjaweihyafie »

The same to you .I'm enjoying the Sprint Festival(The New Year of China) :-)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: how change the text HorizontalAlignment property run ti

Post by HighAley »

Hello.

We are happy for you.
Let us know if you will have any additional questions about our product.

Thank you.
Post Reply