This is a migrated thread and some comments may be shown as answers.

Passing properties to report (session state related)

1 Answer 32 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Angie
Top achievements
Rank 1
Angie asked on 28 Sep 2009, 07:36 PM
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:
 public int advertiserID { getset; }  
        public DateTime startDate { getset; }  
        public DateTime endDate { getset; }  
 
        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; 

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 29 Sep 2009, 10:37 AM
Hi Angie,

Please review the following KB article that elaborates on the usage of Telerik Reporting in out-proc session mode: Design Considerations for Out-Proc Session State.

All the best,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
General Discussions
Asked by
Angie
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or