using Microsoft.Reporting.WebForms;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CrystalDecisions.CrystalReports.Engine;  
public partial class DefaultPrueba : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
   
       
        
       ReportDocument report = new ReportDocument();

         report.Load(Server.MapPath("SampleRpt.rpt"));

         report.SetDatabaseLogon("username", "pwd", @"server", "database");
         CrystalReportViewer1.ReportSource = report;
    

        
    }
}