Page 1 of 1

how to set column size and align at Crosstab dynamically.

Posted: Wed Oct 26, 2016 6:18 am
by gramman75
Hi.

we make Cross Tab Report. This report has 3 data Source. OD_Columns, OD_Rows, OD_Values.
OD_Columns is Column Data. OD_Rows is Row Count Data. OD_Values is values.


i want to dymamicaally Column size and Align according to OD_Columns.ALIGN.

if OD_Columns.ALIGN is right, Text Option > Right to Left set false, OD_Columns.ALIGN is Left, Text Option > Right to Left set true.

is it possible?

Re: how to set column size and align at Crosstab dynamically

Posted: Thu Oct 27, 2016 6:37 am
by Alex K.
Hello,

You can use the following code in the BeforePrint event:

Code: Select all

switch (OD_Columns.ALIGN)
{
    case "LEFT":
		textControlAlign.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Left;
        break;
    case "CENTER":
		textControlAlign.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Center;
        break;
    case "RIGHT":
		textControlAlign.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Right;
		textControlAlign.TextOptions.RightToLeft = true;
        break;
    case "WIDTH":
		textControlAlign.HorAlignment = Stimulsoft.Base.Drawing.StiTextHorAlignment.Width;
        break;
}
Thank you.