Page 1 of 1

use calculated column in regdata

Posted: Sat Sep 15, 2012 1:58 pm
by maryam
hello every one, ihave report with a calculated column in data source in c# How Can i use calculated column, i mean when i regdata my data table, because i dont have calculated column in my data table my report has problem, how can i regdata my report. in attached file i send you my report.
thanks a lot.

Re: use calculated column in regdata

Posted: Mon Sep 17, 2012 10:30 am
by Alex K.
Hello,

Try to use the following code:

Code: Select all

StiCalcDataColumn col = new StiCalcDataColumn("Column", "Column", typeof(double), "dtSuggestItm.Importance*dtSuggestItm.Rank");
report.Dictionary.DataSources["dtSuggestItm"].Columns.Add(col);
Thank you.

Re: use calculated column in regdata

Posted: Mon Sep 17, 2012 12:42 pm
by maryam
thanks a lot for your reply, that's too userful for me.

Re: use calculated column in regdata

Posted: Tue Sep 18, 2012 3:48 am
by Andrew
Hello,

That is a pleasure to help you.

Thank you.