how to set column size and align at Crosstab dynamically.

Stimulsoft Reports.NET discussion
Post Reply
gramman75
Posts: 1
Joined: Wed Oct 26, 2016 6:06 am

how to set column size and align at Crosstab dynamically.

Post 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?
Attachments
adhoc.zip
(1.32 KiB) Downloaded 160 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

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

Post 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.
Post Reply