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

change datasource for textbox

1 Answer 1577 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kirti
Top achievements
Rank 1
Kirti asked on 28 Apr 2020, 06:05 PM

All I want to do is change the datasource for a textbox. The datasource for an adjacent datasource is the one I want. In the image I want to change the datasource from the one on the left to the one on the right. It seems like this should be simple, but I haven't found a way to change. Thanks. 

 

1 Answer, 1 is accepted

Sort by
0
Elena
Telerik team
answered on 01 May 2020, 08:18 AM

Hi Kirti,

The Data Source Components are intended to specify declaratively how to retrieve data for Data Items but do not contain any data themselves. Their purpose is only to specify the means of how to obtain it. The data items are the ones that display and manipulate data in the reports and are bound to the data source components. There are several types of data items: Report (SubReport), Table, Crosstab, List, Graph, and Map.

When the data needed for your Table, Chart, or another data item is already present in the parent's data source e.g., the report's data source, you can improve the report performance by reusing the data from the parent, instead of creating and configuring a new data source component to retrieve the data anew. You can reuse the data by adding a Binding to the data item's DataSource property with the following expression: = ReportItem.DataObject.

You can read more about how the reporting data objects work in the following links:

https://docs.telerik.com/reporting/designing-reports-connecting-data-to-report

https://docs.telerik.com/reporting/data-items 

https://docs.telerik.com/reporting/data-items-binding-a-data-item-to-data

From what you've written, I assume that you want to have two data source components in one data item which, unfortunately, is not possible by design. You will have to either change the initial data source to the second one or move the textbox in another data item container which is bound to the second data source.

I hope I have managed to explain how data items and binding work clearly enough but if you have any additional questions, feel free to ping us any time.

Regards,
Elena
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
General Discussions
Asked by
Kirti
Top achievements
Rank 1
Answers by
Elena
Telerik team
Share this question
or