Page 1 of 1
Setting horizontal direction of a component programatically
Posted: Fri Feb 28, 2014 2:37 am
by Naveen Aggarwal
Kindly let me know the code for setting horizontal direction of a component (including crosstab) programmatically.
I tried to use report.GetComponentByName("Text1") but didn't find any property/method to set the horizontal direction.
Best Regards !
Naveen
Re: Setting horizontal direction of a component programatica
Posted: Fri Feb 28, 2014 8:17 am
by Alex K.
Hello,
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Re: Setting horizontal direction of a component programatica
Posted: Fri Feb 28, 2014 3:34 pm
by Naveen Aggarwal
I just want to change the horizontal direction of a component say Text or crosstab at run time. For example, I have setup the horizontal direction of a crosstab to centre at design time but for some reason, i want to change the horizontal direction to width in my vb.net code. Kindly let me know, if it is possible to do so and how can i do it.
Re: Setting horizontal direction of a component programatica
Posted: Mon Mar 03, 2014 6:56 am
by Alex K.
Hello,
Please try to use the SummaryDirection property for CrossTab:
CrossTab1.SummaryDirection = Stimulsoft.Report.CrossTab.Core.StiSummaryDirection.LeftToRight;
Thank you.
Re: Setting horizontal direction of a component programatica
Posted: Tue Mar 04, 2014 2:06 am
by Naveen Aggarwal
Thanks a lot for your reply sir !
Kindly let me know what should i do in case of a text component ?
Best Regards !!
Naveen
Re: Setting horizontal direction of a component programatica
Posted: Tue Mar 04, 2014 6:35 am
by HighAley
Hello.
If you need to change horizontal alignment, you should use next code:
Code: Select all
Dim comp = report.GetComponentByName("Text1")
DirectCast(comp, StiText).HorAlignment = StiTextHorAlignment.Right
Thank you.
Re: Setting horizontal direction of a component programatica
Posted: Sun Sep 27, 2015 6:47 am
by ns4098
hi
i have a databand2 in my report and i need to change RightoLeft property of Databand2 in condition of befor print
i have a code like this on the condition
if(DataSource1.CAnswerTime==1)
{
this.DataBand2.Righttoleft=true
}
else
{
this.DataBand2.Righttoleft=true
}
please help me how to set databand horizental coulmn direction by code;
Re: Setting horizontal direction of a component programatica
Posted: Mon Sep 28, 2015 5:14 am
by HighAley
Hello.
The RightToLeft property of the Data Band does not change order of columns.
You should change position of each text component.
Thank you.