>>>Report Viewer Error<<< RRS feed

  • Question

  • User-1924666908 posted

    I am just trying to use Report Viewer in my aspx page but having following error:

    Failed to access IIS metabase.

    as per suggestion given in the error page I have included following piece of code but still no change:

    Source Error:

    The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

      <%@ Page Language="C#" Debug="true" %>

    For this purpose I just created "Report1.dlc" and included dataset fields.

    This Report1.dlc used in Report Viewer and object datasource has been attached in Test.aspx page.

    The code for Test.aspx is attached herewith.


    <%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
        Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %> 
    <asp:Content ID="Content1" ContentPlaceHolderID="MainContent" Runat="Server"> 
    <script type= "text/javascript" src ="JavaScripts/CalendarControl.js"> 
     //It is used to show Calender when click date textbox 
                <td style="width: 758px; height: 37px" valign="top"> 
                    &nbsp;<table style="left: 0px; width: 765px; top: 0px"> 
                            <td align="right" colspan="3" style="width: 470px; height: 3px; text-align: left"> 
                                <span style="font-size: 8pt"> 
                                    <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" 
                                        Height="400px" Width="666px"> 
                                        <LocalReport ReportPath="Report1.rdlc"> 
                                                <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="dstAwaitingONT_vw_pivot_awaitingont_web" /> 
                                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" OldValuesParameterFormatString="original_{0}" 
                                        SelectMethod="GetData" TypeName="dstAwaitingONTTableAdapters.vw_pivot_awaitingont_webTableAdapter"> 
                <td style="width: 758px; height: 33px" valign="top"> 
                    <asp:Panel ID="panelResult" runat="server" Font-Bold="False" Font-Names="Verdana" 
                        Font-Size="Small" Width="1200px" Height="420px" ScrollBars="Auto" Visible="False"> 
    </asp:Content>Please have a look to the code and give me guidance that 

    Please have a look to the code and give me guidance that where I am going wrong.

    Sunday, February 20, 2011 12:40 AM

All replies

  • User-37275327 posted

    can you view the report on visual studio?

    Monday, February 21, 2011 12:17 AM
  • User-1924666908 posted
    No. Only the ReportViewer is visible. Datasource is visible. And Report1.rdlc is attached to ReportViewer
    Tuesday, February 22, 2011 2:30 AM
  • User-37275327 posted

    use databinding

    View.ReportViewer.LocalReport.ReportPath = "Repor1.rdlc"
    View.ReportViewer.LocalReport.DataSources.Add("Name of the dataset");

    Tuesday, February 22, 2011 3:59 AM
  • User-1924666908 posted

    thanks for reply, but dstAwaitingONT.xsd is underlined and showing following error:

     Value of type "String" cannot be converted to 'Microsoft.Reporting.WebForms.ReportDataSource'.

    Partial Class TestReportViewer
        Inherits System.Web.UI.Page
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            ReportViewer1.LocalReport.ReportPath = "Report1.rdlc"
            ReportViewer1.LocalReport.ReportPath = "Repor1.rdlc"
        End Sub
    End Class
    Tuesday, February 22, 2011 4:32 AM
  • User-37275327 posted


    Are you using databases for the reports? Or it is static report?

    check followings


    Tuesday, February 22, 2011 5:09 AM
  • User-1924666908 posted

    I am using database.

    datasets are there in my project.

    I am using table adapters.


    Tuesday, February 22, 2011 5:19 AM
  • User-37275327 posted


    Tuesday, February 22, 2011 5:33 AM
  • User-1924666908 posted

    Simply I took table paste the fields from table from Datasources and linked Report.rdlc with the ReportViewer but it is not displaying table in ReportViewer.

    Before Run this project, at least it should display table.

    Tuesday, February 22, 2011 6:00 AM
  • User-37275327 posted

    you need to fill your dataset before bind to the report. otherwise nothing display

    Wednesday, February 23, 2011 1:40 AM
  • User1471008070 posted

    You could refer to these links, they might give you some help:<o:o:p></o:o:p>

    1. Creating Client Report Definition (.rdlc)
    http://msdn.microsoft.com/en-us/library/ms252067(v=VS.80).aspx <o:o:p></o:o:p>

    2.Get reportviewer http://www.gotreportviewer.com/ <o:o:p></o:o:p>

    3.Samples and Walkthroughs http://msdn.microsoft.com/en-us/library/ms251686(v=VS.90).aspx <o:o:p></o:o:p>

    4.Book Apress - Client-Side Reporting with Visual
    Studio in C#
    http://cid-45bfd76b0f2c3808.photos.live.com/self.aspx/picture/Apress%20-%20Client-Side%20Reporting%20with%20Visual%20Studio%20in%20C%5EN%20%5E5Sep%202007%5E6.pdf <o:o:p></o:o:p>


    Hope this helps.

    Challen Fu<o:o:p></o:o:p>


    Friday, February 25, 2011 6:18 AM
  • User-1924666908 posted

    I checked the links you provided and according to the first link that is for windows based application which I applied on web-based but I got following error:

    Failed to access IIS metabase.

    Although I tried following but still no change at all.:

    1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

      <%@ Page Language="C#" Debug="true" %>

    I don't know why I am not getting success and I am still with the same issue since more than one month. Actually coudn't find other way to resolve issue.

    Wednesday, March 16, 2011 4:50 AM
  • User-1924666908 posted

    The main problem is that I am not getting table infomation in design time on the form.

    Wednesday, March 16, 2011 6:57 AM