アクティブレポートリサイズビューアコントロールは、WPFウィンドウでホストされています
-
26-09-2019 - |
解決
は、既存のあるActiveReportsビューアは、WPFで罰金に動作します。あなたがWPFでそれをホストするためにXAMLの下に使用することができます:
<Window x:Class="ARViewerHostedInWpf.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:arv="clr-namespace:DataDynamics.ActiveReports.Viewer;assembly=ActiveReports.Viewer6"
Title="MainWindow" Height="350" Width="525" Loaded="Window_Loaded">
<Grid>
<WindowsFormsHost Name="windowsFormsHost1">
<arv:Viewer x:Name="ARViewer" Dock="Fill" />
</WindowsFormsHost>
</Grid>
</Window>
XAMLファイルのコードビハインドで次のコードは、上記のXAMLで、視聴者にレポートを接続し、それを実行します。
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
NewActiveReport1 rpt = new NewActiveReport1();
this.ARViewer.Document = rpt.Document;
rpt.Run();
}
}
私はこれをテストするためにあるActiveReports 6 のの現在入手可能なバージョンを使用しています。
希望このことができます!
Scott Willeke
GrapeCity
所属していません StackOverflow