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

ItemDataBound not working after reporting upgrade

2 Answers 302 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Namrata
Top achievements
Rank 1
Namrata asked on 23 Jul 2013, 01:11 PM
Hi,

I have recently upgraded my Telerik.Reporting.dll and Telerik.ReportViewer.WebForms.dll to latest version i.e. 7.1.13.612. However, after the upgarde, the ItemDataBound events for reporting elements has stopped working. The report renders fine, there is no exception, but itemdatabound is not called. Here is the code for itemdatabound:

private void depInGroupHeader_ItemDataBound(object sender, EventArgs e)
    {
       //Some code here
    }


The element 'depInGroupHeader' is of type 'Telerik.Reporting.GroupHeader' section. I am not sure what's wrong here, but the differences between version that works and current version is:

1. Old Dll version 4.2.11.204
2. Old reporting project was .net version 2.0 and current is .net version 4.5.

Can someone please help with this issue. Its really urgent, as we have a release next week.

2 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 26 Jul 2013, 11:31 AM
Hi Namrata,

At our side group header section's ItemDataBound event is fired as expected. In case you have a web application running in out-proc session state configuration, please take a look at the Design Considerations for Out-proc Session State help article and the required settings. Generally in out-proc session state the event of the report items (NeedDataSource, ItemDataBinding, ItemDataBound) have to be attached in the ItemDataBinding event of the Report.

If you need further help, please post the code needed to generate your report definition or if you prefer open a support ticket and send us there your details about the issue.

Regards,
Stef
Telerik

Have you tried the new visualization options in Telerik Reporting Q2 2013? You can get them from your account.

0
Namrata
Top achievements
Rank 1
answered on 01 Aug 2013, 10:01 AM
Hi Stef,

You were correct. The issue was with using out of proc session session. It worked for us after we rebound events in ItemDataBinding event of reports as:

private void rptDummy_ItemDataBinding(object sender, EventArgs e)
       {
           var report = (sender as Telerik.Reporting.Processing.Report).ItemDefinition as Telerik.Reporting.Report;
           
          var detailSection = report.Items.Find("detail", true)[0] as Telerik.Reporting.DetailSection;
           var labels = report.Items.Find("labelsGroupHeaderSection", true)[0] as Telerik.Reporting.GroupHeaderSection;
   
           detailSection.ItemDataBound += detail_ItemDataBound;
           labels.ItemDataBound += labelsGroupHeaderSection_ItemDataBound;
       }

Thanks for your help.

Namrata
Tags
General Discussions
Asked by
Namrata
Top achievements
Rank 1
Answers by
Stef
Telerik team
Namrata
Top achievements
Rank 1
Share this question
or