Link to home
Start Free TrialLog in
Avatar of rmk
rmk

asked on

How to import Microsoft.Reporting.WebForms in a non web page class module

Why can't I use

Imports Microsoft.Reporting.WebForms

in a VB.NET class module in the AppCode folder of my web application?

I get an error that the namespace doesn't contain any public member or that the namespace cannot be found?

However, on aspx page with a reportviewer control, Visual Studio adds

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
    Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

and I can refer to that namespace in the code behind.
Avatar of rmk
rmk

ASKER

The solution is adding the following the the web.config file

<add assembly="Microsoft.ReportViewer.WebForms, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
ASKER CERTIFIED SOLUTION
Avatar of kodiakbear
kodiakbear

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial