How to integrate SSRS into

Programming, error messages and sample code > sample code
Firstly, please make sure you published the reports to our reporting server, you can read following article to publish your reports. Click Here to publish your reports via visual studio.
There is a sample code to connect your reports via application.
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<!DOCTYPE html>

<html xmlns="">
<head runat="server">
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        <rsweb:ReportViewer ID="ReportViewer1" runat="server">
using System;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Net;
using Microsoft.Reporting.WebForms;

public partial class _Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)
        if (!this.IsPostBack)
                ReportViewer1.Width = 800;
                ReportViewer1.Height = 600;
                ReportViewer1.ProcessingMode = ProcessingMode.Remote;
                IReportServerCredentials irsc = new CustomReportCredentials("reportingUser", "YourPassword", "SSRS Server"); // e.g.: ("demo-001", "123456789", "sql5090")
                ReportViewer1.ServerReport.ReportServerCredentials = irsc;
                ReportViewer1.ServerReport.ReportServerUrl = new Uri("");
                ReportViewer1.ServerReport.ReportPath = "/ReportingRootFolder/ReportingFile"; //e.g.: /demo-001/test

public class CustomReportCredentials : IReportServerCredentials
    private string _UserName;
    private string _PassWord;
    private string _DomainName;

    public CustomReportCredentials(string UserName, string PassWord, string DomainName)
        _UserName = UserName;
        _PassWord = PassWord;
        _DomainName = DomainName;

    public System.Security.Principal.WindowsIdentity ImpersonationUser
        get { return null; }

    public ICredentials NetworkCredentials
        get { return new NetworkCredential(_UserName, _PassWord, _DomainName); }

    public bool GetFormsCredentials(out Cookie authCookie, out string user,
     out string password, out string authority)
        authCookie = null;
        user = password = authority = null;
        return false;
Note: Please do not foget replase parameters in Default.aspx.cs file.
You can download the template directly here