Do not have idea how to start RRS feed

  • Question

  • User-1249419835 posted

    Hi All,

           I am totally new to developing SSRS reports. I got some idea from different forums on creating SSRS reports but I am finding very difficult to call the same from asp.net. I am looking for a way to display list of reports from SSRS once I click on reports from client side asp.net.  This is the path I want get connected to once I select Reports in asp.net.


    This is what I have tried

    <asp:Content ID="Content2" ContentPlaceHolderID="cphContent" Runat="Server">
        <rsweb:ReportViewer ID="MyReportViewer" runat="server" Font-Names="Verdana" 
            Font-Size="8pt" Height="400px" ProcessingMode="Remote" Width="400px">
                ReportServerUrl="" />

    My code behind:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
            MyReportViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote
            MyReportViewer.ServerReport.ReportServerUrl = New Uri("http://cvgutils01/Reports_PDIRPT")
            ' Report Server URL 
            MyReportViewer.ServerReport.ReportPath = "http://cvgutils01/Reports_PDIRPT/Pages/Report.aspx?ItemPath=%2fDriverData&ViewMode=List"
            ' Report Name 
            MyReportViewer.ShowParameterPrompts = False
            MyReportViewer.ShowPrintButton = True
        End Sub

    I am not sure how to really set the path to list of all reports. I tried but neither gives me error nor displays the report. Please help me with this.


    Friday, March 16, 2012 1:03 PM

All replies

  • User306743125 posted


    How about this?
    Create a GridView which get its data from the Catalog table in the Reporting Services DataBase.
    This will list all the available reports, add a select to the GridView. If selected, pass the reportname to the ReportViewer.
    You could filter your report selection to only display reports in ceertian folders, on your reportserver, if you do not what to give the external user access to all reports.

    Binding the GridView: (gridview.aspx.cs)

        protected void loadReportGrid()
            SqlConnection conn = null;
                string connStr = ConfigurationManager.ConnectionStrings["ReportServerConnectionString"].ConnectionString;
                string query = "SELECT Name as ReportName, Path as ReportPath, Description FROM Catalog  WHERE Path LIKE '%AspFolder/Some Reports%' AND Type<>1";
                conn = new SqlConnection(connStr);
                SqlCommand cmd = new SqlCommand(query, conn);
                SqlDataReader reader;
                cmd.CommandType = CommandType.Text;
                reader = cmd.ExecuteReader();
                GridView1.DataSource = reader;
            catch (Exception ex)
    Add the "Select" option to the GridView: (gridview.aspx)
                <asp:TemplateField HeaderText="Selection" HeaderStyle-HorizontalAlign="Center"> 
                <ItemTemplate > 
                    <asp:HyperLink ID="lnkSelect" runat='server' ItemStyle-CssClass="gvColumns" NavigateUrl='<%# String.Format("ReportViewer.aspx?ReportPath={0}", Eval("ReportPath")) %>'>Select</asp:HyperLink> 
    Load the selected report: (reportviewer.aspx.cs)
        protected void Page_Load(object sender, EventArgs e)
            if (!IsPostBack)
                string Report = Request.QueryString["ReportPath"];
                ReportViewer1.ServerReport.ReportPath = Report;
                string UserIdValue = Profile.RefKey;
    Saturday, March 17, 2012 3:00 AM
  • User-1249419835 posted

    Thank you very much for your reponse. But my manager is so particular, he does not want me to complicate things. I think he is basically sql server guy and would like to call a iframe and execute everything from sql server. So this is what I did.


    <%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Reports.aspx.vb" inherits="Reports"%>
    <asp:Content ID="Content1" ContentPlaceHolderID="cphhead" Runat="Server">
    <asp:Content ID="Content2" ContentPlaceHolderID="cphContent" Runat="Server">
    <iframe src="http://cvgutils01/Reports_PDIRPT/Pages/Folder.aspx?ItemPath=%2fDriverData&ViewMode=List"  height ="500" width = "80%" frameborder ="0"></iframe>
    The problem with this is that while running it locally from Visual studio,  I get "Microsoft JScript runtime error: Unable to set value of the property 'className':
     object is null or undefined" error from ReportingServices.js file. I really do not have any idea from where VS2008 is executing this file. 
    It works fine, if I include the above code in reports.aspx file on the server after I published it. So there is something happening running locally and running after publishing it. 
    Can you or anyone help me with this? I am totally new to SSRS reports as well as asp.net. This is my first project. Please let me know if you need more info.
    Thanks in advance
    Monday, March 19, 2012 8:37 AM
  • User306743125 posted
    You can't do it's through an iframe...this is what the reportviewer is for. There is nothing complicated about.
    Monday, March 19, 2012 1:20 PM