code please.... .net core and .net framework use same syntax
string connection = @"....";
using (SqlConnection cnn = new SqlConnection(connection))
{
    cnn.Open();
    using (SqlCommand cmd = new SqlCommand("SELECT * FROM Data", cnn))
    {
        using (SqlDataReader dr = cmd.ExecuteReader())
        {
            while (dr.Read())
            {
              ...
            }
        }
    }
}
I work with entity framework, and this error also happen if connect to sql directly from report designer and pass report file to web report while preview in designer work fine.
Comments
var Model = new WebReport();
Model.Report.Load("Reports/SQLReport.frx");
return View(Model);
report file in attachment
remember, report designer uses .net framework, and your web app uses .net standard (core) library