Sir,
Using your guide i could write how to use ssrs in mvc
But when i deployed it to server it and click the report link it is asking for windows authentication.
for anonyms user how server login can be provided.
is there any way any site user can see ssrs local report without any further login/password
if (!IsPostBack)
{
ReportViewer2.ProcessingMode = ProcessingMode.Local;
//ReportViewer2.LocalReport.ReportPath = Server.MapPath("BioData.rdlc");
ReportViewer2.LocalReport.ReportPath=
Server.MapPath(@"~/Reports/BioData.rdlc");
//@"Apanlog.Reports.BioData.rdlc";
// Request.MapPath(Request.ApplicationPath) + @"Reports\BioData.rdlc";
using (SqlConnection con = new SqlConnection(Apanlog.Properties.Settings.Default.constr))
{
con.Open();
SqlCommand cmdBioData = new SqlCommand("BioData", con);
cmdBioData.CommandType = CommandType.StoredProcedure;
string cid = Request.QueryString["childId"];
cmdBioData.Parameters.AddWithValue("@childid", cid);
DataTable dtBioData = new DataTable();
dtBioData.TableName = "BioData";
dtBioData.Load(cmdBioData.ExecuteReader());
ReportDataSource datasource = new ReportDataSource("ListDataSet", dtBioData);
ReportViewer2.LocalReport.DataSources.Clear();
ReportViewer2.LocalReport.DataSources.Add(datasource);
ReportParameter p1 = new ReportParameter("childid", cid);
ReportViewer2.LocalReport.SetParameters(p1);
IReportServerCredentials irsc = new CustomReportCredentials("username", "password", "India");
ReportViewer2.ServerReport.ReportServerCredentials = irsc;
ReportViewer2.LocalReport.Refresh();
con.Close();
}
}