Report viewer in wpf and selection formula

Posted by shabi on Stack Overflow See other posts from Stack Overflow or by shabi
Published on 2010-01-01T07:25:19Z Indexed on 2010/04/19 16:03 UTC
Read the original article Hit count: 826

Filed under:
|
|

I have a WPF application that I would like to present SQL Server Reporting Services sql 2008 reports in. I understand we have to use host widow control and then in report viewer control. I want to use remote processing mode. My code sample is : I have added namespaces:

using System.Windows.Forms; using System.Windows.Forms.Integration; using Microsoft.Reporting;
using Microsoft.ReportingServices; using Microsoft.Reporting.WinForms;

My XAML:

xmlns:wfi="clr-namespace:System.Windows.Forms.Integration;assembly=WindowsFormsIntegration"
xmlns:wf="clr-namespace:System.Windows.Forms;assembly=System.Windows.Forms"
xmlns:wfr="clr-namespace:Microsoft.Reporting.WinForms;assembly=Microsoft.ReportViewer.WinForms"

Title="ReportHost" Height="300" Width="300">
<Grid>
    <wfi:WindowsFormsHost Height="100" Margin="39,27,39,0" Name="winFormsHost" VerticalAlignment="Top" >

        <wfr:ReportViewer x:Name="rptViewer" ProcessingMode="Remote"   />  

    </wfi:WindowsFormsHost>

</Grid>

Code: rptViewer.ServerReport.ReportServerUrl = new Uri("http://mymachine-:8080/ReportServer_myreports"); rptViewer.ServerReport.ReportPath="/Reports/mytestreport.rdl"; rptViewer.ServerReport.Refresh();

My question is that how how can I set selection formula in microsoft report viewer control [like crystal report]. Or miscroft provided any this else which behave like selection formula in crystal reports.

And when I run the code it show only report viewer in host window control but not the report data in window.

Please some one provide me all step list, Which I have to fallow to get required result with sample code.

Quick response will be appricated.

© Stack Overflow or respective owner

Related posts about wpf

Related posts about report