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

How to Access an Application datasource winforms

3 Answers 107 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 13 Jan 2012, 10:01 AM
Hi, am new to telerik and programing in general, i need help in understanding how i can obtain fields from a dataview or reader in winforms and have the telerik report that i built as a class libraray access the data at runtime. my problem is that because they are built as seperate parts, i cant seem to figure out how to refer the result runtime data to appear in the the report, any help will be greatly appreciated. 

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 17 Jan 2012, 05:07 PM
Hello Daniel,

You can check Programmatic Control of Reports help article for more information about the fundamental operations in code. You can also check Using the NeedDataSource event to connect data help article. Additionally you can provide us with more information about what you are trying to achieve and what is your current setup.

All the best,
IvanY
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

0
Daniel
Top achievements
Rank 1
answered on 19 Jan 2012, 08:18 AM
thank you for the reply,I have seen and read both sections suggested, and they still dont seem fully to cover what i need done(or maybe i lack understanding). my setup is this, i have a winforms application, a SQL database and my report class library,  the thing is, i need to be able to get results from the application i.e from several text boxes at runtime and use them in a report, but from most of the tutorials, the reports always access data independenlty from the application which is good most of the time, however, i need mine to depend on the front end app for data. i have attached an image of the front end section of the app to help explain what i mean.. When i click return on the app, i want to generate a report that picks its data from the current data being displayed in the textboxes. i think what would help would be clear is an example of a report using a datasource that is created by the winforms app at runtime, instead of a datasource that is created with the report during the report creation process(be it the wizard or through the code.i am using VB by the way). 
0
IvanY
Telerik team
answered on 20 Jan 2012, 06:10 PM
Hi Daniel,

Thank you for clarifying the issue. In your case you can use the ObjectDataSource in order to get your data - create a method that returns the dataset from your Win Forms application and bind via the ObjectDataSource to that method. As explained in the article any component that implements the IEnumerable, IListSource or IDbDataAdapter can be assigned to the DataSource property. You can also check the ListBoundReport in our examples that come with the product (Start -> All Programs -> Telerik -> Reporting Q3 2011 -> Visual Studio 2010 Examples -> VB.NET).

Kind regards,
IvanY
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

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