Page 1 of 2

how to Sort calculated columns with coding

Posted: Mon Aug 16, 2010 11:34 am
by so29
Hello
How can sort the calculated column ؟

DataBand1.Sort = new string[2]
{
"ASC",
"Name"
};

I use the above code
I can sort the columns
But no calculated column
:brick:

Please guide me
Thank you


how to Sort calculated columns with coding

Posted: Tue Aug 17, 2010 1:17 am
by Jan
Hello,

Please use following format:

Code: Select all

            ASC
            {Customers.CustomerID2}
          
Thank you.

how to Sort calculated columns with coding

Posted: Tue Aug 17, 2010 2:14 am
by so29
Hello

Where to use
begin render Event ?
Please Give more explanation

Thank you.

how to Sort calculated columns with coding

Posted: Tue Aug 17, 2010 7:20 am
by Alex K.
Hello,

You can use the following code in Begin Render events of report:

Code: Select all

DataBand1.Sort = new string[2]
{
"ASC",
"ColumnName"
};
Thank you.

how to Sort calculated columns with coding

Posted: Tue Aug 17, 2010 7:30 am
by so29
Aleksey wrote:Hello,

You can use the following code in Begin Render events of report:

Code: Select all

DataBand1.Sort = new string[2]
{
"ASC",
"ColumnName"
};
Thank you.
Hello

I've used the same code
But this code does not sort calculated column

Thank you


how to Sort calculated columns with coding

Posted: Wed Aug 18, 2010 1:24 am
by so29
Jan wrote:
Please use following format:

Code: Select all

            ASC
            {Customers.CustomerID2}
          
.
Hello,

Please tell where and how this code should I use :dumb:

Thank you

how to Sort calculated columns with coding

Posted: Wed Aug 18, 2010 1:27 am
by Alex K.
Hello,

Code: Select all

DataBand1.Sort = new string[2]
{
"ASC",
"ColumnName"
};
To make this code work, it is necessary to embed it before compilation, because data should be calculated by calculated columns.

Thank you.

how to Sort calculated columns with coding

Posted: Wed Aug 18, 2010 6:40 am
by so29
Aleksey wrote: To make this code work, it is necessary to embed it before compilation, because data should be calculated by calculated columns.
Hello,
I am using the Begin event rendering
Unfortunately will not work correctly

:tire:

Please Give more explanation

Thank you.

how to Sort calculated columns with coding

Posted: Wed Aug 18, 2010 7:15 am
by Alex K.
Hello,

Use the following code in your application:

Code: Select all

StiReport report = new StiReport();
report.Load(@"D:\Report.mrt");
Stimulsoft.Report.Components.StiDataBand band = report.GetComponents()["DataProducts"] as Stimulsoft.Report.Components.StiDataBand;
band.Sort = new string[2] { "DESC", "{Products.Column}" };
report.Compile();
report.Show();
Thank you.

how to Sort calculated columns with coding

Posted: Wed Aug 18, 2010 8:05 am
by so29
Hello,
Thank you

Please note this
calculated column made in report page
Not in the application


May
About code guide

Code: Select all


            ASC
            {Customers.CustomerID2}
          

Thank you