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

Binding Dataset - Errors

2 Answers 317 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Melissa
Top achievements
Rank 1
Melissa asked on 14 Jul 2016, 02:31 PM

Hello!

I have a report that I need to bind a dataset to.  I have created a new dataset in Visual Studio 2012 and added my table adapter to the dataset.  I go into my report and add a new data source.  I select "Object Data Source" and I see my table adapter in the list.  I select it and click next where I am prompted to choose a data member.  These options are displayed:

  1. InvoiceDetailsForPrintingGetTableAdapter
  2. Fill(InvoiceDetailsForPrintingGetDataTable)
  3. GetDate():InvoiceDetailsForPrintingGetDataTable
  4. ToString()
  5. ClearBeforeFill
  6. Container
  7. Site

 

No matter what I choose, when I finish the configuration and go into the data source it throws an error.  

Telerik.Reporting.Processing.Data.ObjectDataSourceException: Member GetData() on type InvoiceDetailsForPrintingGetTableAdapter not found.
   at Telerik.Reporting.Processing.Data.MemberMatch.ThrowMemberNotFound(Type type, String name, ObjectDataSourceParameterCollection parameters)
   at Telerik.Reporting.Processing.Data.MemberMatch.FindMemberMatch(Type type, String name, ObjectDataSourceParameterCollection parameters, Type& returnType)
   at Telerik.Reporting.Processing.Data.ObjectDataSourceInstanceResolver.TryResolveReturnObjectFromType(Type type, String dataMember, ObjectDataSourceParameterCollection parameters, Object& result)
   at Telerik.Reporting.Processing.Data.ObjectDataSourceInstanceResolver.TryResolveAsMethodInvocation(Object dataSource, String dataMember, ObjectDataSourceParameterCollection parameters, Object& instance)
   at Telerik.Reporting.Processing.Data.ObjectDataSourceInstanceResolver.ResolveDataSource(Object dataSource, String dataMember, Boolean evaluateParametersValues)
   at Telerik.Reporting.Processing.Data.ObjectDataSourcePropertiesResolver.ResolveDataSourceProperties(ISimpleDataProvider provider, Object dataSource, String dataMember, IEnumerable`1 parameters)
   at Telerik.Reporting.Processing.Data.ObjectDataProviderBase`1.ResolveDataSourceProperties()
   at Telerik.Reporting.Processing.Data.ObjectSchemaAdapter.<GetFields>d__1.MoveNext()
   at Telerik.Reporting.Processing.Data.SimpleSchemaAdapter.AddDataMeasures(SimpleDataModel model)
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.GetSchemaCore()
   at Telerik.Reporting.Processing.Data.DataProvider`1.Telerik.Reporting.Processing.Data.IDataProvider.GetSchema()
   at Telerik.Reporting.Data.Design.DataSourceDesignerBase.Telerik.Reporting.Design.Interfaces.IDataSchemaProvider.GetSchema()
   at Telerik.Reporting.Data.Design.DataSourceService.GetSchemaFromContext(Object context)
   at Telerik.Reporting.Data.Design.DataSourceService.Telerik.Reporting.Design.Interfaces.IDataSourceService.GetCurrentDataItemSchema()
   at Telerik.Reporting.Design.DataExplorerControl.<>c__DisplayClass2.<RefreshDataSource>b__0()

 

But there is a GetData on my data set - I verified it by going into the data set designer and it says "GetData(@cutOff, @invoiceId)" under the GetTableAdapter.  I need to be able to see the fields in the dataset in the report designer so that I can use them in the report.  Any help would be appreciated!

Thanks!

 

2 Answers, 1 is accepted

Sort by
0
Melissa
Top achievements
Rank 1
answered on 14 Jul 2016, 04:46 PM

Additional Information:

1. This is my first Telerik Report so I wanted to make sure the problem wasn't the data set.  I used a RDLC and was able to attach my dataset to it and see the fields.   So the dataset is good.

2. I've deleted and recreated the Object Data Source but it till throws the same error. The error is displayed on the Data Explorer display and it says,  "no data source." 

0
Stef
Telerik team
answered on 15 Jul 2016, 12:50 PM
Hello Melissa,

In general, data source components are a declarative way to specify how data can be retrieved. the reporting engine creates data objects and executes their data retrieval methods based on the data source component's settings.
For example, the purpose of the ObjectDataSource component is to provide data to the report in a declarative manner. The ObjectDataSource.DataSource should be the assembly qualified name or Type of the data access layer (class), where the reporting engine will use System.Reflection to create the instance of the class (by using its default parameterless constructor) and to execute its method specified by the ObjectDataSource.DataMember.


When you specify a DataMember and the method expects parameters, you can provide hard-coded values or map the arguments to report parameters e.g. Using Parameters with the ObjectDataSource Component  (step 3 of the ObjectDataSource Wizard). This will let the method to be executed correctly on preview.


The attached demo project illustrates a DataSet which is loaded with data from AdventureWorks database. There two GetData methods fetching data and used by the different data items in the report. Please compare your settings with these of the demo report.
The project uses Telerik Reporting R2 2016 SP1, which can be changed by running the Upgrade Wizard. You can find also a SWF file that can be previewed in IE browser, illustrating the settings - DSsourceVideo.zip.

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
Tags
General Discussions
Asked by
Melissa
Top achievements
Rank 1
Answers by
Melissa
Top achievements
Rank 1
Stef
Telerik team
Share this question
or