I have created a devexpress XtraReport file in my wpf application. Loaded the data into the report using custom Sql Query in Report wizard. How can i display the report on button click in a xaml usercontrol screen?
Currently i am trying to display as below :
private void GenerateZBReport_Click(object sender, RoutedEventArgs e)
{
XtraReport report = new XtraReport();
DocumentPreviewWindow window = new DocumentPreviewWindow();
window.PreviewControl.DocumentSource = report;
report.CreateDocument(true);
window.ShowDialog();
}
I think this could help:
For more information, check this link: Report viewer in XtraReports C#.Net using Winforms Devexpress?