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

Example binding custom dll

7 Answers 387 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 25 Jun 2015, 08:46 PM

I am evaluating the reporting functionality and I really need some help on binding a custom dll.  

This is what I have done so far.

1) Created a .net dll with the following code.  The dll is in the same folder as the trdx file

namespace ClassLibrary1
{
    [System.ComponentModel.DataObject()]
    public class Person
    {
        public string Name { get; set; }
    }
}

I added the data source to the trdx file as follows

<DataSources>
    <ObjectDataSource Name="ClassLibrary1" />
  </DataSources>

 

When I open the project in the Data Explorer I only ClassLibrary1.  I expected to see the object Person and under that the Name property.  I opened the Configure Object Data Source window but both tabs are blank.  

I have spent hours reading the forum and the pdf tutorial and just cannot figure this out. I must be missing some simple point on this. Any help would be appreciated.

Better yet does anyone has a simple example they would like to share? 

 

BTW: 

I also tried making a dll with a DataSet with some tables using the designer in visual studio but no luck with this either.

 

 

 

7 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 26 Jun 2015, 10:20 AM
Hi Michael,

Please check the video materials and my post in the Can I write a report without including a SQL Statement forum thread.

Let us know if you need any further help.

Regards,
Stef
Telerik
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
Michael
Top achievements
Rank 1
answered on 26 Jun 2015, 01:30 PM

Thanks Stef,

I had seen this post and think I am doing everything correctly.  I have a dll with a simple DataSet and one DataTable.  I am expecting in the Report Designer in the DataExplorer tab I would see my DataTable and properties.  On the bottom window of the designer I see my assembly.  If I select configure I do not see any of the objects in the class.  I must be making a simple mistake.

In the documentation it states "Any component that implements IListSource, including DataTable, DataSet and DataView"

 I have a very simple example but I cannot attach zip file.  Is there any way to get the example to you?

0
Stef
Telerik team
answered on 26 Jun 2015, 02:47 PM
Hi Michael,

Based on your code snippet (your first post), the ObjectDataSource component is not configured to use the external assembly and its types - ObjectDatasource wizard. After configuring the ObjectDataSource component the Data Explorer must be loaded with the direct properties of the selected type.

If after the configuration the data is not listed in the Data Explorer, please send us a zip file with the code. for the purpose log in your account at telerik.com you will be able to submit a support ticket. Please specify the product of interest and provide a short description how to reproduce the problem with the provided code. A video illustrating the issue and the settings on your machine will be helpful as well.

Regards,
Stef
Telerik
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
Michael
Top achievements
Rank 1
answered on 26 Jun 2015, 03:13 PM

When you say Object DataSource Wizard are you referring to the dialog that shows up in the designer when you select "Object Data Source" If this is the case I see nothing listed in either tab.  I am just going to send in the example.  I have a feeling I am doing something really stupid but I need someone to take a quick look for me.

 

0
Stef
Telerik team
answered on 29 Jun 2015, 12:41 PM
Hello Michael,

Below is q quote from my response in your support ticket on the same question:
"Please check the attached video, illustrating how we are using an external assembly to provide data for a report designed by the Standalone Designer.

Note that records must be retrieved on initializing the data object. Also the proving element in the Standalone Designer configuration points to a sub folder of the execution folder.
"

The video is attached to this post for anyone concerned as well.

Regards,
Stef
Telerik
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
Michael
Top achievements
Rank 1
answered on 29 Jun 2015, 07:20 PM
OK thank you Stef I now get it and it is working.  One thing that really confused me.  I copied the Telerik.ReportDesigner.exe and modified the config file.  I created a report and my business objects showed up.   Now close the report designer down and double click on the newly generated report.  The business objects are missing from the report.  I get why this is happening because the report is being opened by the registered location of the report designer.  Took me about 15 minutes to realize what was going on.
0
Stef
Telerik team
answered on 30 Jun 2015, 09:47 AM
Hi Michael,

I am glad to hear the issue is resolved, and yes, your observations are correct.
TRDX files are associated with the Standalone Designer tool, which will be started from the registered installation folder. Thus it may be better to copy the DLLs on build in the Standalone Designer tool's folder and to have extended the tool's config file there.

Regards,
Stef
Telerik
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
Report Designer (standalone)
Asked by
Michael
Top achievements
Rank 1
Answers by
Stef
Telerik team
Michael
Top achievements
Rank 1
Share this question
or