I'm trying to figure out how to have my properties populate correctly. This all works fine in my test project, but when I try to incorporate the reports into my regular project, which uses SQLServer as the SessionState mode, the properties are no longer populated. In addition, the EmailPromotionReport() is fired twice. How can I set this up properly? Thanks.
Report Code:
Calling report code:
Report Code:
public int advertiserID { get; set; } |
public DateTime startDate { get; set; } |
public DateTime endDate { get; set; } |
public EmailPromotionReport() |
{ |
/// <summary> |
/// Required for telerik Reporting designer support |
/// </summary> |
InitializeComponent(); |
this.NeedDataSource += new System.EventHandler(this.EmailPromotionReport_NeedDataSource); |
} |
private void EmailPromotionReport_NeedDataSource(object sender, EventArgs e) |
{ |
Telerik.Reporting.Processing.Report report = (Telerik.Reporting.Processing.Report)sender; |
report.DataSource = (FarranMedia.Classes.Promotions.GetMailingsByAdvertiser(advertiserID,startDate,endDate)).Tables[0]; |
} |
Calling report code:
Reporting.EmailPromotionReport reportBlast = new Reporting.EmailPromotionReport(); |
reportBlast.advertiserID = advertiserID; |
reportBlast.startDate = Convert.ToDateTime("1/1/07"); |
reportBlast.endDate = DateTime.Today; |
ReportViewer1.Report = reportBlast; |