WPF 4: Windows Forms Host, Crystal Reports Asynch - wpf

Is there a way to render WinForms controls like Crystal Reports Viewer asynch, or even in a different thread, without freezing the applicaton.
My problem is that, when I assign the report source property, the viewer tried to render the report and some reports run for so long and it freezes the whole app.
Thanks in advance

This may not be required.. looks the default behavior of both Crystal Reports 2010 Winforms and WPF viewers render the report asynchronously. They show a spinner while rendering instead of holding the UI thread. This way you UI, most of the times, still remains responsive.

Related

SSRS. Reports seem corrupted within the report viewer

I have a WPF application using server side SSRS reports. I'm using the WPF WinFormsHost control, embedding the winforms report viewer control, to display the reports.
On about 20 development pc's and client pc's everthing works ok. The problem is that in a new clients office, on 2 pc's only, the reports seem to be corrupted when viewing within the report viewer. (They print out fine)
Table data is ok, but header data field values are missing. Has anybody experienced this? I'm at a complete loss as to why on these 2 machines data seems to be missing in the report viewer.
Any help would be greatly appreciated.
The Winforms Report Viewer control is not designed to be embedded inside WPF application. You can use WindowsFormsHost Winforms control to host Report Viewer inside your WPF Application, but the data binding of the ReportViewer has to be handled programmatically, because the ReportViewer control will not have knowledge of WPF's Window datasource at all.
This is a sample walkthrough article of embedding Windows Forms control inside WPF: https://msdn.microsoft.com/en-us/library/ms750944.aspx

How to remove automatic scrolling in a winform application?

I have a winform ( Windows Form) application, in .NET 4.0. On the main screen, I have two DataGridView, one on the top of the second. If I start my application on a small screen (say 1024x768), I don't completely see the second DataGridView. When I click inside this second DataGridView, the screen automatically scroll to show me the complete DataGridView. I DONT want that behaviour cause now I cannot see important information in my first DataGridView!.
Then how could I remove this annoying behaviour?
FYI: my application is optimized for 1280x960 screen.
thank you very much
You might be looking for this
Setting this property to false should resolve the issue.

wpf WindowsFormHost

Hi Every Body
Am Working With WPF Application
I Needed To Use MS Reports In My Application So I Used WindowsFormsHost
But The Problem Is That The WindowsFormsHost Can'nt Handle Touch Events
How I Can Handle Touch Events In My Report In WindowsFormsHost
Please I Need Ur Help
Thanks
The question is as old as multi touch. As long as the control doesn't support it, you have to trick. Whether that's going to work depends on the control. The BING map control was successfully made to respond to touches. I think there's a touch enabled layer that takes touches and translates them to window messages. This can get a real mess.
Please keep in mind, that even if you can get such a solution to work, you won't get a touch optimized control. The control will probably have a bad, bad user experience...
If it's all about displaying data, I've described a possible alternative implementation on my post: for answer How to display a PDF document in a Microsoft Surface application?

Is it possible to add a crystal report to a tabcontrol in Silverlight?

I have to add a crystal report to a tab item from a tabcontrol in Silverlight.
Is it possible to do this without using 3rd party controls, just with usual controls on Visual Studio ? And if it is possible, how do I do this?
I don't think so, but you can certainly export the report to HTML format with code and display that in the silverlight control.
Unfortunately, no.
Plus there's no way of displaying an HTML content inside a Silverlight application; so you cannot export the report in HTML format in order to display it either.
A Silverlight application runs within a sandbox provided by the Silverlight plugin, and you cannot have an HTML document or element rendered in it.
So your best shot would be to either code a custom reporting service inside your application, or fire up the Crystal Reports on a new window or a separate HTML layer.

Microsoft Report Viewer Control not displaying report

I have built a simple report and run it successfully in test winform apps but when I try to run the same report in my production winforms application, the report just doesn't show up in the viewer. I look at the ReportViewer control after InitializeComponent and everything looks fine.
Are there debugging techniques or gotcha's that might be able to point me to why the report is not showing. It feels like there should be an error of some sort but it just displays a blank form.
This was a simple mistake.
In implementing the report viewer in a MVP environment, I managed to not notice/implement the RefreshReport in the Form Load. Once I called Refresh Report, the report showed up.

Resources