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

Asp.net MVC report with ObjectDataSource

1 Answer 96 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 28 May 2017, 07:12 PM
I just started my trial period and am still trying to figure things out.

I have an ASP.NET MVC website. I added a Terlerik Report Library project to my solution. In it, I created a report using Visual Studio Report Designer. The report uses an ObjectDataSource which points to a function in a custom DLL in my solution. When I run my website and go to the 
report viewer page I get the error:

The assembly "MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" is not permitted to be used by an ObjectDataSource component. Please include it in an AssemblyReferences element in the Telerik.Reporting configuration section of your application configuration file


I have tried copying this from the report library's app.config to my website's web.config
   <Telerik.Reporting>
        <Cache provider="" />
        <cache provider="" />
        <assemblyReferences>
            <add name="MyLib" version="1.0.0.0" />
        </assemblyReferences>
        <SessionState provider="" />
        <restReportService>
            <storage provider="" />
            <reportResolver provider="" />
        </restReportService>
    </Telerik.Reporting>
but this causes my website to have a config error: "The configuration section 'Telerik.Reporting' cannot be read because it is missing a section declaration"

I have also found this forum post
http://www.telerik.com/forums/the-assembly-xxx-is-not-permitted-to-be-used-in-an-objectdatasource

but I don't understand things well enough yet to know what I'm supposed to do with a custom resolver.

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 31 May 2017, 04:10 PM
Hi Eric,

You also need to declare Telerik.Reporting section in the configuration file of the Reporting REST Service project.
For more details about the error please check this KB article.


If you need details about binding data, please go through Using the HTML5 Viewer in MVC applications and binding data.

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