Click here to Skip to main content
15,890,336 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I have one program that include several windows
after add this code to any window, after open this window, my program is crash
XML
<rv:ReportViewer x:Name="reportviewer_name" RightToLeft="Yes"/>

this code add to a "WindowsFormHost" in WPF
in windows 8.1 is ok
this problem is on windows7
فارسی:سلام
من یه برنامه دارم که برای قسمت گزارش اومدم و کد زیر رو با استفاده از یه WindowsFormHost به یکی از پنجره ها اضافه کردم اما در زمان باز کردن این پنجره،برنامه کامل بسته میشه
code of this window
XML
<Window
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:rv="clr-namespace:Microsoft.Reporting.WinForms;assembly=Microsoft.ReportViewer.WinForms" 
        xmlns:Viewer="clr-namespace:Stimulsoft.Report.Viewer;assembly=Stimulsoft.Report.Wpf" xmlns:WpfDesign="clr-namespace:Stimulsoft.Report.WpfDesign;assembly=Stimulsoft.Report.WpfDesign" xmlns:Wpf="clr-namespace:Stimulsoft.Report.Wpf;assembly=Stimulsoft.Report.Wpf" xmlns:WPF="clr-namespace:Neodynamic.WPF;assembly=Neodynamic.WPF.Barcode" xmlns:WPF1="clr-namespace:Aspose.BarCode.WPF;assembly=Aspose.BarCode.WPF" x:Class="صحب_فثسف_یل.win_print" 
        Title="win_print" Height="632.707" Width="561.654">
    <Grid>
        <Button Content="click the show report" HorizontalAlignment="Left" Margin="24,10,0,0" VerticalAlignment="Top" Width="126" Click="Button_Click"/>
        <WindowsFormsHost HorizontalAlignment="Left" Height="191" Margin="242,2,0,0" VerticalAlignment="Top" Width="309">
            <rv:ReportViewer x:Name="myreportv1"/>
        </WindowsFormsHost>
    </Grid>
</Window>
Posted
Comments
Andreas Gieriet 26-Dec-14 9:19am    
What is the stackdump?
Windows 8.1 runs .Net Framework 4.5.2, while Windows 7 only runs .Net Framework 4.0.
I guess that you compile the application towards a newer .Net Framework than is available on Win 7.
If it shall run on Win 7, you must compile against .Net 4.0 Framework.
Regards
Andi
Member 10976155 26-Dec-14 9:27am    
I have .Net Framework 4.5 on Win7 and run my program but just one window do crash that have this code
rv:reportviewer x:name="reportviewer_name" righttoleft="Yes" rv:reportviewer
Andreas Gieriet 26-Dec-14 11:52am    
Towards which .Net Framework do you compile? See the build tab of your project in VS2013.
Andi
Member 10976155 27-Dec-14 7:12am    
compile whit .Net 4.5 and 4 and 3.5
Member 10976155 27-Dec-14 7:12am    
I compile with .Net4.5 and 4 and 3.5 but not solve my problem

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900