Embedded analytics report parameters not passing to underlying dataset

We’ve embedded SSRS 2016 reports in our ASP.NET web application using the ReportViewer control, but parameters aren’t being passed correctly to the underlying datasets. The reports work perfectly when accessed directly through the Report Server, but in the embedded context, the dataset queries receive null parameter values. We’re using the SetParameters method to pass values before rendering:

ReportParameter[] params = new ReportParameter[] {
    new ReportParameter("StartDate", "2025-01-01"),
    new ReportParameter("EndDate", "2025-06-30")
};
reportViewer1.ServerReport.SetParameters(params);

The parameter names match exactly what’s defined in the report (case-sensitive). The report renders without errors, but shows no data because the dataset query isn’t receiving the parameter values. We’ve verified the parameter binding in code matches the report definition. Has anyone encountered issues with parameter name matching or ReportViewer control parameter passing in embedded scenarios?

Check if your parameters are marked as ‘Internal’ in the report definition. Internal parameters don’t get passed through the ReportViewer control API. They need to be regular visible parameters (you can hide them from the UI if needed, but they can’t be marked Internal). Also verify the parameter data types match between your C# code and the report definition.

We are using shared datasets! That might be the issue. How do I verify the parameter mapping between report parameters and shared dataset parameters? Is there a specific configuration in Report Builder for this?

Don’t remove the default values entirely - that will cause other issues. Instead, set them to expression-based defaults that check for null. The real issue is likely in how the dataset is referencing the parameters. In the dataset query, you need to reference report parameters with the @ symbol, not dataset parameters. Make sure your query uses @StartDate and @EndDate, not just StartDate and EndDate.