기존 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();
}
}
나는 이것을 테스트하기 위해 currently available version of ActiveReports 6을 사용하고 있습니다.
희망이 도움이됩니다.
Scott Willeke
GrapeCity