// i'm using needdatasource event to fetch data with report parms
void RptSaleDailyView_NeedDataSource(object sender, EventArgs e)
{
Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender;
.
.
// fetch data into business objects.
var list = MyBizObject.GetReportData();
// i'm sure my bisiness object has records for various child objects.
this.objectDataSource1.DataSource = list;
report.DataSource = this.objectDataSource1;
//// sub report binding
this.subMainPart.Bindings.Add(new Telerik.Reporting.Binding("ReportSource", "= GetSaleMainPartReportSource(ReportItem.DataObject.DayReportList)"));
}
public static ReportSource GetSaleMainPartReportSource(object source)
{
var report = new RptDailyMainPartView();
report.DataSource = source;
return new InstanceReportSource { ReportDocument = report };
}
public RptDailyMainPartView()
{
//
// Required for telerik Reporting designer support
//
InitializeComponent();
this.Bindings.Add(new Telerik.Reporting.Binding("DataSource", "=ReportItem.Parent.DataObject.DayReportList"));
Hello,
I have a table in a report where the text of the header of one column must contain an expression. The problem is that the DataSource of the table is set to the table data. So how can I accomplish this?
Detailed information:
1. The table contains a ranking.
2. The table contains one column with amounts (earnings for the team).
3. The currency of the amounts is set at a higher level (tournament). It depends on the place where the tournament is played.
4. I would like the header to display Prize (EUR) or Prize (USD)
Currently this is done by code, but I would like to know if it's possible to do it with an expression.
Patrick