or
subReport2.NeedDataSource += new EventHandler(subReport2_NeedDataSource);
private
void
subReport2_NeedDataSource(
object
sender, EventArgs e)
{
//read parent/master row data:
int
goalID = ??;
//how to get the data from the current master row?
//get measurements for this goal:
System.Data.DataSet ds2 = DataHelper.Measurements_GetMeasurementsForGoal(goalID);
var objectDataSource =
new
ObjectDataSource();
objectDataSource.DataSource = ds2;
subReport2.Report.DataSource = objectDataSource;
}
//
// cartesianCoordinateSystem1
//
this
.cartesianCoordinateSystem1.Name =
"cartesianCoordinateSystem1"
;
this
.cartesianCoordinateSystem1.XAxis =
this
.graphAxis1;
this
.cartesianCoordinateSystem1.YAxis =
this
.graphAxis2;
//
// graphAxis1
//
this
.graphAxis1.LabelFormat =
"{0:C0}"
;
this
.graphAxis1.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this
.graphAxis1.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this
.graphAxis1.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this
.graphAxis1.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this
.graphAxis1.MinorGridLineStyle.Visible =
false
;
this
.graphAxis1.Name =
"graphAxis1"
;
this
.graphAxis1.Scale = numericalScale1;
//
// graphAxis2
//
this
.graphAxis2.LabelFormat =
"{0:Y}"
;
this
.graphAxis2.MajorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this
.graphAxis2.MajorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this
.graphAxis2.MinorGridLineStyle.LineColor = System.Drawing.Color.LightGray;
this
.graphAxis2.MinorGridLineStyle.LineWidth = Telerik.Reporting.Drawing.Unit.Pixel(1D);
this
.graphAxis2.MinorGridLineStyle.Visible =
false
;
this
.graphAxis2.Name =
"graphAxis2"
;
this
.graphAxis2.Scale = categoryScale1;
<system.serviceModel>
public
class
ExtendedColumn : TableBodyColumn
{
public
string
Name {
get
;
set
; }
}
Broken example:
public
class
ExtendedTable : Table
{
public
int
HeaderHeight {
get
;
set
; }
}
private void crosstab1_NeedDataSource(object sender, EventArgs e)
{
using (EntitiesModel dbContext = new EntitiesModel())
{
int dealid = Global.GetInt32(this.ReportParameters["dealID"].Value.ToString());
int version = Global.GetInt32(this.ReportParameters["version"].Value.ToString());
bool amended = Global.GetBool(this.ReportParameters["amended"].Value.ToString());
bool postContract = Global.GetBool(this.ReportParameters["postContract"].Value.ToString());
bool staging = Global.GetBool(this.ReportParameters["staging"].Value.ToString());
bool commOption = Global.GetBool(this.ReportParameters["commOption"].Value.ToString());
IEnumerable<
rsDealsDealerOpt
> d = dbContext.GetDealsDealerOptions(dealid, version, postContract, staging, amended, commOption);
crosstab1.DataSource = d;
}