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

Dispatcher Suspended

3 Answers 152 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 12 Feb 2013, 10:18 AM
Hi

I'm using

Reporting: 6.2.13.110
WPF-Controls: 2012.3.1129.40

I upgraded from Q1/2012 to the version mentioned above and experience weird behaviour since then.

I use the ReportViewer in a MVVM Scenario where it is nested in a DataTemplate to dynamically toggle the view
based on the DataType of some property.

<DataTemplate DataType="{x:Type local:ReportViewerViewModel}"
                     x:Shared="False">
           <local:ReportViewer />
       </DataTemplate>
 
       <DataTemplate DataType="{x:Type local:PdfViewerViewModel}"
                     x:Shared="False">
           <local:PdfViewer DataContext="{Binding FilePath}" />               
       </DataTemplate>


Report displays fine, but changing the Property to engage another datatemplate crashes the app.

There is a null reference exeption, and also "Dispatcher processing has been suspended, but messages are still being processed." - Exception.

ReportViewer looks like this:

<UserControl x:Class="Ra.WPF.ReportViewer"
...
             Name="_this">
    <Grid DataContext="{x:Null}">
        <telerikReportViewer:ReportViewer Name="_rv"
                                          telerik:StyleManager.Theme="Windows7"
                                          ReportSource="{Binding DataContext.ReportSource, ElementName=_this}" />
    </Grid>
</UserControl>


I'm also wondering why the telerik people (documentation people) call this production code.

Look here: http://www.telerik.com/help/reporting/wpf-report-viewer-embedding-the-viewer.html

Following the example you get bloated with binding errors.

I know the reason for this to happen, but does a newbe?

Besides from that the VS-Report Designer is a whole mess in my opinion.
I still can't handle nested collections, there is groups disppearing or inacessible through the designview, just to mention a few.

Could just throw the whole reporting away!


Martin

3 Answers, 1 is accepted

Sort by
0
IvanY
Telerik team
answered on 18 Feb 2013, 09:08 AM
Hello Martin,

Please check your support ticket for more information about your issue with the WPF Report Viewer.

Regarding the other problems you are having:
  1. What kind of binding errors did you experience when using the code snippets from our help article? We were not able to reproduce any issues at our end.
  2. Telerik Reporting can handle nested collections. What you should do is use either subreports or tables. In both cases you will have to set the data source of the item with binding (dynamically). For example if you are using a table the binding will look like this: DataSource   =Fields.MyList. In case you need an example you can open a support ticket and we can attach it there.
  3. We will be grateful if you provide us with additional information about your issue with the groups since we are not able to reproduce it locally. You can also open a support ticket and attach a runnable sample that reproduces the issue - that way we will be able to identify the culprit faster and advise you accordingly.

All the best,
IvanY
the Telerik team

HAPPY WITH REPORTING? Do you feel that it is fantastic? Or easy to use? Or better than Crystal Reports? Tell the world, and help fellow developers! Write a short review about Telerik Reporting and Telerik Report Designer in Visual Studio Gallery today!

0
Ross
Top achievements
Rank 1
answered on 14 Mar 2013, 05:57 AM
Having the same issue.  "Dispatcher processing has been suspended, but messages are still being processed."  Downloaded the latest Reporting patch build to fix other issues, but this one is biting us.  

Help.
0
Stef
Telerik team
answered on 15 Mar 2013, 05:36 PM
Hi Ross,

In Martin's case we have identified an issue when the data context is changed and the ReportSource property of the WPF ReportViewer control is not handled correctly, e.g. switching reports displayed in the viewer causes an exception in specific scenarios. The fix for this problem will be provided in a subsequent release.

As your error message is very general, please elaborate on your code, when does the exception occurs, which Telerik Reporting and Telerik RadControls for WPF versions are used. If possible send us a runnable sample project illustrating the issue in a support ticket, so we can test at our side.

Greetings,
Stef
the Telerik team

Telerik Reporting Q1 2013 available for download with impressive new visualizations. Download today from your account.

Tags
General Discussions
Asked by
Martin
Top achievements
Rank 1
Answers by
IvanY
Telerik team
Ross
Top achievements
Rank 1
Stef
Telerik team
Share this question
or