Ankit  Shukla

Ankit Shukla

  • 1.3k
  • 668
  • 70k

SSRS Report is not showing using asp.net c#

Jul 28 2020 1:43 AM
Dear All,
 
I am trying to fetch ssrs report, but fails.
My code is below:
 
ReportViewer Rptview = new ReportViewer();
Rptview.Visible = true;
Rptview.ProcessingMode = ProcessingMode.Remote;
Rptview.ServerReport.ReportServerCredentials = new ReportCredentials(ConfigurationManager.AppSettings["UserName"], ConfigurationManager.AppSettings["Password"], "");
Rptview.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings["ReportURL"]);
if (string.IsNullOrEmpty(ReportName))
{
Rptview.ServerReport.ReportPath = "";
}
else
{
Rptview.ServerReport.ReportPath = ConfigurationManager.AppSettings["ReportPath"].ToString() + ReportName;
}
Rptview.ServerReport.DisplayName = "Test" + "_" + System.DateTime.Now.ToString();
Rptview.ShowCredentialPrompts = false;
Rptview.ShowPrintButton = true;
Rptview.ShowParameterPrompts = false;
Rptview.ShowPromptAreaButton = false;
Rptview.ShowToolBar = true;
Rptview.ShowReportBody = true;
if (param != null)
{
Rptview.ServerReport.SetParameters(param);
}
Rptview.ServerReport.Refresh();

 Please help.

Answers (1)