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

A report cannot be created... (silverlight)

3 Answers 103 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kenneth
Top achievements
Rank 1
Kenneth asked on 08 Apr 2014, 10:01 PM
Just downloaded the Reports trail.  Looked at the quickstart documentation and the VB.NET silverlight example (which runs just fine).

I attempted to replicate the demo on my own, so I created a solution with a report class, a web project, and a silverlight project.  I referenced all the proper dll's per the demo example.  I added the svc file as the documentation described.  The preview of the report class works, it loads and displays records from my database.

After going over it line by line I can find no substantive differences between my project and the demo project but I have 2 problems:

1. The report viewer does not show in the designer.  This is not a big deal but it does show in the demo.

2. when I run the project everything renders fine but the report says 'A report cannot be created form Report1, ReportClassLibrary1', which is the name of the report class and project respectively.

The only difference between the demo and my project is I use a sql data source pointing to a sql server 2008 r2 on a server hosted on my local network.  I put in a simple select Name query against a client table.  As I said the report works in the preview tabs provided by the report designer.

I checked all the paths and names pretty carefully, I can find nothing wrong except what I may be missing because I don't know exactly all the details of how everything fits together (but I have a pretty good idea, I think).

So...what can I try to get this working?  I need be I can upload the sample project I created, but the database will need to be provided and the connection string changed.

3 Answers, 1 is accepted

Sort by
0
Kenneth
Top achievements
Rank 1
answered on 09 Apr 2014, 01:03 AM
Resolved error #2

I needed to fully qualify the class as in the Report  property below.  I suppose the demo was using a common namespace so it did not need to do that?  I still have issue #1 however, no report viewer design view in xaml.


<
telerik:ReportViewer Grid.Row="1" x:Name="ReportViewer1"
                      Width="1000"
                      ReportServiceUri="../ReportService.svc"
                      Report="ReportClassLibrary1.TestReport1, ReportClassLibrary1">
</telerik:ReportViewer>
0
Kenneth
Top achievements
Rank 1
answered on 09 Apr 2014, 03:50 PM
I'm on a roll...Solved issue #1, report viewer not rendered in silverlight design view.

Apparently if no theme is set (in app.xaml, mergeddictionaries since I'm using Q1 2014) then none of the controls will render, design or run time.

I was following the reporting demo example which set the theme at run time, but when I removed that code the report viewer and the radcombobox failed to render at all.  So I added the themes to the app.xaml and now I can see the report viewer in design mode.

Here is the app.xaml snippet


<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Assets/Styles.xaml"/>
<ResourceDictionary Source="Themes/Summer/System.Windows.xaml"/>
<ResourceDictionary Source="Themes/Summer/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="Themes/Summer/Telerik.Windows.Controls.Input.xaml"/>
<ResourceDictionary Source="Themes/Summer/Telerik.Windows.Controls.Navigation.xaml"/>
<ResourceDictionary Source="Themes/Summer/Telerik.ReportViewer.Silverlight.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
0
Hinata
Top achievements
Rank 1
answered on 11 Apr 2014, 02:22 PM
Hi Ken,

I have the same issue where the designer doesn't show up in VS. Thank so much for posting this solution, I will try it and see if it helps. It is not a critical issue, since the viewer is displaying fine in runtime, but still it was bothering me.
Tags
General Discussions
Asked by
Kenneth
Top achievements
Rank 1
Answers by
Kenneth
Top achievements
Rank 1
Hinata
Top achievements
Rank 1
Share this question
or