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

Telerik Reporting 2017 R2: Problem with dynamic textbox binding

2 Answers 29 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Alessandro Strazzari
Top achievements
Rank 1
Alessandro Strazzari asked on 18 May 2017, 04:06 PM
Hello,

I use in my project Telerik Reporting q1 2011. Now it's time to change and upgrade to latest version. I downloaded the 30 days trial of Telerik Reporting 2017 R2 but I found a big problem in one of my report (the most complex and important of my project)

I created a Report with 2 subreports. Every subreport is composed by a table created dinamically (without Editor). 

I divided the table in 2 parts:

Header: with repeat in every page
Row
I used a DataTable like DataSource and the columns of my table is created dinamically with the same number of DataTable columns.

Very cell of table is a textbox with value in this format: =Fields.<name_of_field>.

The very strange problem is now: the binding of columns is right but the data is wrong. For Example:

DataTable:

ID    -     Name

1      -     Esteban Lombardo

2      -     Alessandro Strazzari



In my report is see:

ID     -     Name

1      -     1

2      -     2



With debugger is see that every cell is with correct value (=Fields.<name_of_fields>) but on textbox_itemdatabound i see always the <name_of_field> of the first column of DataTable like Value.



You can find my code at this link:

https://www.dropbox.com/s/hvx1ahz8emqysqj/Logica_Telerik_Reporting_2017_r2.zip?dl=0



For me is very important solve this problem because i want to purchase the new Telerik Suite. But if this problem persist i need to use the older version.



Thank you very much
Best regards,
Alessandro Strazzari

2 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 22 May 2017, 01:23 PM
Hello Alessandro,

The issue is that you use events to modify the report template, and as of R3 2016 changes on items in events are not accepted - Changes on items in report events are not applied. You will need to move the code in the report's constructor after the InitializeComponent method.

On a side note, if you need to use events to set data, you need to get the processing report or other data item (e.g. processing Table) and to set its DataSource property. also the running values of parameters are accessible through the processing report - example.

Regards,
Stef
Telerik by Progress
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Alessandro Strazzari
Top achievements
Rank 1
answered on 23 May 2017, 08:31 AM

Hi Steff, Problem solved!!!

My problem was in the code that generate the  dynamic coolumns! I forgot to enter the Name property of TableGroup! (see code below)

Telerik.Reporting.TableGroup current_tableGroup = new Telerik.Reporting.TableGroup();
                        current_tableGroup.Name = "tableGroup_" + colName;
                        var currentHeaderCell = CreateHeaderCell(currentReportCell.Field, currentReportCell.Title, lastPosition_X, 0.2, currentReportCell.Width, 0.5 * 2);
                        current_tableGroup.ReportItem = currentHeaderCell;
                        table1.ColumnGroups.Add(current_tableGroup);
I

 

With this update, the problem was solved!!!

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