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

Create Datasource

3 Answers 100 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Noah
Top achievements
Rank 1
Noah asked on 09 May 2017, 08:07 AM

Hi,

I have a web project using entity framework and web api. So i designed .cs file to send object from web api. In this .cs file, i defined IEnumerable object to get data from Oracle database by oracle procedure.

Through your documentation, i think i can set IEnumerable to object data soucre. But when i'm try to do this, an error appear:

No parameterless constructor defined for this object.

When i choose .cs file in object data source wizard, system auto connect to entity domain to get my object model. I think last step is problem. I don't know how i can set default parameter. When i typing somthing, it's raise an error: 'Can not convert System.String to ...' my object data model.

I hope anyone can help me soon.

Thank you!

 

3 Answers, 1 is accepted

Sort by
0
Katia
Telerik team
answered on 10 May 2017, 01:15 PM
Hello Noah,

Check if the report has a parameterless constructor:
public Report1()
        {
            //
            // Required for telerik Reporting designer support
            //
            InitializeComponent();
 
            //
            // TODO: Add any constructor code after InitializeComponent call
            //
        }

You can also test switching to EntityDataSource component as suggested by my colleague in this forum post
With ObjectDataSource component, the DataSource property 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 constructor).


Regards,
Katia
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
Noah
Top achievements
Rank 1
answered on 16 May 2017, 04:47 AM

Thank Katia so much.

So i have new problem.

I create table in detail. Get datasoure for it and set field for sum cell. 

When i export it, i met problem with this table. It loop to fit page size but i don't want this result.

Help me please!

0
Katia
Telerik team
answered on 18 May 2017, 09:54 AM
Hi Noah,

It is not clear what exactly is the issue with the table when it is exported, a screenshot showing the problematic output might help in understanding the issue.
In general, the Table item will only expand based on the number of data source records and the size of the Table item's rows and columns.

In case the table item is repeating in your scenario this might happen when both report and table have data sources - Data Binding Problems - Repeating data. In this case, you can reset the report's DataSource property or place the Table item inside Group Header or Group Footer section.


Regards,
Katia
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
Noah
Top achievements
Rank 1
Answers by
Katia
Telerik team
Noah
Top achievements
Rank 1
Share this question
or