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

setup with ria servie class library

3 Answers 107 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ubuntu
Top achievements
Rank 1
Ubuntu asked on 04 Jun 2011, 03:40 PM
Dear All,

I have edited that post to be more acurate ...

I have a an applicatio built using PRISM4, RIA service class library, I went through the best practice example and added a SL class library to hold my reports objects. When I tried to add the first report to that class library, I got an error (see attahcment "cl_error_add_report.jpg").

But when I try to add the report to my RIA service .web project I have no problem at all.

What should I do to implement the best practice of having the telerik reports.

Best regards

3 Answers, 1 is accepted

Sort by
0
Ubuntu
Top achievements
Rank 1
answered on 04 Jun 2011, 07:34 PM
Dear All,

I went a little bit far...
First :
I realized that the class library shouldn't be SL at all, it should be normal Class Library ( am I correct in this?)

Second:
I configure the class library to use a connection string and developed a straight forward report that selects from different tables and it went fine (I can preview the data in the designer).

Third:
I set up the app.config for RIA service class library to handle the reportservice, I also created the ReportService Class with the respective markup.

When I run the report I receive the following inner exception:
------------- InnerException: -------------
  
System.ServiceModel.CommunicationException : The remote server returned an error: NotFound.
   at System.ServiceModel.Channels.Remoting.RealProxy.Invoke(Object[] args)
   at proxy_2.EndRenderAndCache(IAsyncResult )
   at Telerik.Reporting.Service.SilverlightClient.ReportServiceClient.OnEndRenderAndCache(IAsyncResult result)
   at System.ServiceModel.ClientBase`1.OnAsyncCallCompleted(IAsyncResult result)
  
------------- InnerException: -------------

I have more few questions here:
1- why do I receive that error.
2- can I configure the report class to use the same database configuration and also the EF4 model, to retrieve the data?

Thanks & best regards

0
Ubuntu
Top achievements
Rank 1
answered on 06 Jun 2011, 12:47 AM
I managed to get to work...

for the second question, can I make the report class library point to the same RIA service project holding my entity framework, or I have to create another one inside the report class ..??

I copied the connection string from the RIA service project and it appears in the connection string, but when I move forward I can't find my domaincontext class ...

EDITED:
----------
I have copied also the Entity DataModel & the DomainService class to the report class library from the RIA service project
Build
and now I can see the entities (I guess if I add a new method I call easily bind to my report).

Is this the right approach ...??
Any help
0
Ubuntu
Top achievements
Rank 1
answered on 06 Jun 2011, 04:35 PM
Dear All,

I have managed to go through.
I don't have to build another EF model, I just create a partial class for my Entities and reference the .web project in the reports class library.

This blog was very useful : http://blogs.telerik.com/telerikreportingteam/posts/10-12-16/connecting_telerik_reporting_to_sql_azure_via_open_access.aspx

Best regards
Tags
General Discussions
Asked by
Ubuntu
Top achievements
Rank 1
Answers by
Ubuntu
Top achievements
Rank 1
Share this question
or