.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Report Viewer 10 / "Not a trusted assembly" error

Posted By:      Posted Date: October 28, 2010    Points: 0   Category :Sql Server


We updated our application to VS2010 / .NET 4.0. We are using the WinForms Report Viewer control to display .rdlc files. Some of the files reference framework DLLs (System.Core, System.Drawing, System.Xml)

*If* I use the deprecated methods, everything works. 

Set the CAS policy to legacy in the app.config:

<NetFx40_LegacySecurityPolicy enabled="true" />

Trust the assembly:

_reportViewer.LocalReport.AddTrustedCodeModuleInCurrentAppDomain("System.Drawing, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a");

HOWEVER: I would like to not depend on the deprecated method. If I do this, instead:

            PermissionSet permissions = new PermissionSet(PermissionState.None);

            permissions.AddPermission(new FileIOPermission(PermissionState.Unrestricted));

            permissions.AddPermission(new SecurityPermission(SecurityPermissionFlag.Execution));


            Assembly asmSystemDrawing = Assembly.Load("System.Drawing, Version=, Culture=neutral, PublicKeyToken=

View Complete Post

More Related Resource Links

Report viewer error


  • An error has occurred during report processing.
    • A data source instance has not been supplied for the data source "PatientDetailsReport_DataTable1".

  • i am using two to three rdlc reports in my page for single report viewer when i first load the page i got the output in reportviewer but when i try to load other rdlc report then am getting the above mentioned error.i cleared all the datasources for the report viewer before giving new datasource but am getting the same error pls someone help

Report Viewer Control Error

Hi All, I am adding a report datasource dynamically to report view web server control and getting the following eroor when i open the page. The DataSourceID of the ReportDataSource 'DataSet1_employees' of the ReportViewer 'ReportViewer1' must be the ID of a control of type IDataSource. A control with ID 'DataSet1_employees' could not be found.     Please help me where i am going wrong. The code is given below: protected void Page_Load(object sender, EventArgs e)    {        ReportViewer1.ProcessingMode = ProcessingMode.Local;        ReportViewer1.LocalReport.ReportPath = "Report2.rdlc";         ReportDataSource rdS = new ReportDataSource("Employees", GetData());        rdS.DataSourceId = "DataSet1_employees";        //this..Add(rdS);                ReportViewer1.LocalReport.DataSources.Add(rdS);        ReportViewer1.LocalReport.DataSources["Employees"].DataSourceId = "DataSet1_employees";        ReportViewer1.LocalReport.DataSources["Employees"]

report viewer error / visual web developer 2008 / sql server 2008 / report viewer add on / win7 x64

hi, i decided to export my local site to iis today, the process wasn't smooth.   anyway. i was able to access my site, the db tables are working as i am able to create new records and retrieve them. my main problem now is with the report object. i've tried the work around found here : http://support.microsoft.com/kb/2002980.. it helped sort of. i used to have only a big page of error before i did the work around, now i am able to see half of the report (the report interface) but the contents, the field are filled with 404 errors. any idea how i can fix this??                  

Report Viewer Webpart shows error

Hi Friends, I am Report Viewer Webpart in sharepoint 2010 when i provide the report1.rdl to this webpart it shows the error "SQL extension is not registerd on this web application" any help would be appreciated  

JavaScript Error while calling a drill through report in a report viewer from a asp.net web page.


I am calling a report in a web page which is getting displayed in report viewer. This report comes fine but when I click on it to see the drill through report for this parent report the drill through report does not get displayed and I see a JScript error instead.

The error I get is something like,

parent.document.GetElementByID(...).ClientController is not null or not an object

The aspx page that contains the report viewer inherits from a master page that contains an Update Panel.

I tested the report separately in SSRS and the drill through is working fine there.

Can some one please provide any inputs on this one?



VS 2010 Report Viewer Designer Error


Hi ,

I have installed VS2010 Ultimate version and placed a report viewer in a web form . When i try to design a report thru the report viewer i get this error.

Could not load file or assembly 'ZedGraph' version = , Culture = neutral , PublicKeyToken = 02a83cbd12fcd60 or one of its dependencies . The system cannot find the file specified .


Error on page with Report Viewer


VS2010 (vb.net)

I have an aspx page that contains a gridview and a report Viewer. When the user select a report from the gridview the the report is loaded into the viewer. My problem is when the initial page loads I get an

Error: Sys.ArgumentNullException: Value cannot be null.
Parameter name: panelsCreated[1]

as no report is loaded into the report viewer. Is there a way round this without loading a report ?


Add SQL Server Reporting Services Report Viewer webpart on SitePage give error.



i have use Sharepoint Foundation 2010 with VS 2010. i have config  in Reporting Services 2008 R2 SharePoint integrated-mode. when in add  SQL Server Reporting Services Report Viewer webpart  on SitePage it give error message. "The Controls collection cannot be modified becouse the control contains code blocks(i. e. <%...%>)." How i can add this web part on my SitePage?

Navaratan Sharma

Report Viewer - Web Part Preview Error


Report viewer web part preview is showing the following error

Microsoft SQL Server Reporting Services
This web part has not been configured correctly. Please contact the document owner.

I have to resolve this error to customize the report viewer.  How to resolve this error

Dhanapal Chinnusamy

How to use report viewer 2010 in VS 2008


I downloaded report viewer 2010 from here


Now I want to actually use it in a website.  How do I do that?  Do I have to modify some part of web.config?  Specifically, what do I need to change?


populate report viewer by code


Hi all

I have a button "Show Report" to show some data from table

what I should write under this button to populate the reports ?

Error Message when trying to open crystal report


Logon failed. Details: 42000:[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "DATA" requested by the login. The login failed. Error in File C:\Windows\TEMP\NewQuote {573CE511-64B7-4161-B9DF-0E58EB1EDA19}.rpt: Unable to connect: incorrect log on parameters.

I get the above message when loading the crystal report from the Intranet via IIS but it works fine from the localhost the report loads ok and picks up my parameters.  This is my Code behind Page.

Protected Sub form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles CrystalReportViewer1.Load

        Dim Count As Int32
        Count = Int32.Parse(Label1.Text)

        Dim ConnInfo As New ConnectionInfo
        With ConnInfo
            .ServerName = "\\Server1\Sqlexpress"
            .DatabaseName = "DATA"
            .UserID = "sa"
            .Password = "1181

Crystall Report error VS2010



i write a site and get this error, i using VS2010.

  • An error occurred during local report processing.
    • The definition of the report 'Modules\Report1.rdlc' is invalid.
      • An unexpected error occurred in Report Processing.
        • Could not load file or assembly 'Microsoft.ReportViewer.ProcessingObjectModel, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.

i try run on my machine its all work fine, but when i complier and run it on Window server 2008 get this error.

I read http://forums.asp.net/p/1513402/3613239.aspx I install the ReportViewer.exe but still cannot find the Microsoft.ReportViewer.ProcessingObjectModel.dll, however I got find it Microsoft.ReportViewer.ProcessingObjectModel in C:\Windows\assembly and is not a dll file. any suggestion?



Passing report parameters by report viewer


I have 4 parameters in which 3 are passed in report and 1 is passed through report viewer. I have made a parameter in SSRS called CandidateId to which I want to pass the value. The code for report viewer is:

 intReportID = Convert.ToInt32(Request.QueryString["ReportID"
 CandId = Convert.ToString(Session["CandidateId"
lblReportName.Text = dtReport.Rows[0]["ReportName"
SSRSReportViewer.ShowCredentialPrompts =false

 SSRSReportViewer.ServerReport.ReportServerCredentials = new
SSRSReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.


 SSRSReportViewer.ServerReport.ReportServerUrl = new

SSRSReportViewer.ServerReport.ReportPath = dtReport.Rows[0]


 Microsoft.Reporting.WebForms.ReportParameter[] theparams = new

theparams[0] = new
, CandId);
theparams[0].Visible = false

SSRS Report viewer + Remove


I am running the report from SSRS report server in the view i am finding that the window title is Report Viewer - Windows Internet Explorer.

How to remove this name and get the name of the report over there.

I am using java at the back end to call the repot through url.

Please help me .

Thanks ,


How I disable vertical scroll bar of report viewer control on Web Form.


I'm displaying .rdlc report file using Report viewer control on Webform. If  I Fix height of viewer control and data is not same as to size of viewer control then it display one scrollbar on viewer control and second vertical scroll bar is coming on webpage.

 I want to off viewer vertical scrollbar or in simple word's I don't want to display two scroll bar with my report. Please guide me or send me reference if any.


Microsoft Report Viewer control to display data on one page


Hello everyone,

I am wondering if the Microsoft Report Viewer control allows for display changes.  Say for instance a user wants would like to see all the data requested then another time would like to toggle thru the pages of infomation.  So does anyone know if the control allows for display changes from complete view to paginated viewing.  I am using MS VS 2008 with ASP.NET 3.0.  Thanks for your response.


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend