use calculated column in regdata

Stimulsoft Reports.Silverlight discussion
Locked
maryam
Posts: 26
Joined: Tue Jun 05, 2012 1:13 am

use calculated column in regdata

Post 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.
Attachments
RptSrvSuggestionItm.mrt
(42.38 KiB) Downloaded 436 times
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: use calculated column in regdata

Post 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.
maryam
Posts: 26
Joined: Tue Jun 05, 2012 1:13 am

Re: use calculated column in regdata

Post by maryam »

thanks a lot for your reply, that's too userful for me.
Andrew
Posts: 4108
Joined: Fri Jun 09, 2006 3:58 am

Re: use calculated column in regdata

Post by Andrew »

Hello,

That is a pleasure to help you.

Thank you.
Locked