Ms Sql connection error

when create report with sql data source and pass it to web report,it give me this error "Can't find object MsSqlDataConnection".

Comments

  • edited 8:24AM
    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())
                {
                   ...
                }
            }
        }
    }
    
  • edited 8:24AM
    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.
  • edited 8:24AM
    code:

    var Model = new WebReport();
    Model.Report.Load("Reports/SQLReport.frx");
    return View(Model);

    report file in attachment
  • edited 8:24AM
    are you using mssql connection embedded in frx file? delete it!
  • edited 8:24AM
    are you using mssql connection embedded in frx file? delete it!

    remember, report designer uses .net framework, and your web app uses .net standard (core) library
  • edited 8:24AM
    do you mean Delete all Dictionary childs nodes from frx file or just delete MsSqlDataConnection node and let it's childs?
  • edited March 2018
    just mssql data connection.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.