Reporting not showing within ReportViewer Control when configured via C# code-behind

1 Answer 26 Views
Report Viewer - WPF
Top achievements
Rank 1
Tommy asked on 07 Nov 2023, 01:18 AM

Hello All!  I am having some difficulties debugging an issue with the ReportViewer not showing the rendered Report.  The Output states that the report was rendered in X seconds.  My report xaml is as follows:

    xmlns:tr="" x:Class="FRAC_FLOW.TestReport"
    Title="Report Viewer Window">

    <Grid x:Name="LayoutRoot">
        <Grid Margin="20" >
                <RowDefinition Height="*" />

            <tr:ReportViewer Grid.Row="0" x:Name="ReportViewer1"/>

I am setting the source and parameters in the constructor:

public TestReport()

    Telerik.Reporting.Parameter parm = new Telerik.Reporting.Parameter { Name = "JobId", Value = "7215" };
    Telerik.Reporting.Parameter parm1 = new Telerik.Reporting.Parameter { Name = "Date", Value = DateTime.Now.ToShortDateString() };

    var reportSource = new UriReportSource();
    reportSource.Uri = new Uri("Reports/ReplacementParts.trdp", UriKind.RelativeOrAbsolute).ToString();

    ReportViewer1.ReportSource = reportSource;
When I call this code from a button, I just do the Window.Show() method I saw in the examples.  The Window and Viewer seem to popup just fine, however, I am not seeing the report.  I have reviewed the report in the Report Designer, and I don't see anything that would cause it not to open.  In fact, I can Preview the report just fine, and the data looks good.  Any help is highly appreciated, as I've been stuck on this for a day now, and I've never reached out for help on here!  Thanks in advance!

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 09 Nov 2023, 01:18 PM

Hello Tommy,

Your code looks correct and the fact that you see a message stating the time it took to render the report, supports this.

What you experienced looks more like a styling issue to me so I would suggest making sure that the viewer component is styled using implicit styles.

See Setting the Theme of WPF Report Viewer for more information.

Additionally, please verify that the required assemblies have the version that corresponds to your Reporting version (see Upgrade articles).

You can examine the WPF integration demos we distribute with the Telerik Reporting installation, for reference. By default, the examples can be found in: 

C:\Program Files (x86)\Progress\Telerik Reporting <VERSION>\Examples\CSharp

I hope this helps.

Best Regards,
Progress Telerik

Stay tuned by visiting our roadmap and feedback portal pages, enjoy a smooth take-off with our Getting Started resources, or visit the free self-paced technical training at
Report Viewer - WPF
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question