Well, due to a special request from a special friend I felt to put SSRS stuff over here.
What this Post contains
While integrating SSRS Report, the report.rdl file is loaded inside ReportViewer Control but, An issue occurs, that the report asks for Credentials Every Time.
This post contains C# code which can set Credentials dynamically from Web.config which may resolve the issue.
Prior Knowledge Required
To go through this Post, a programmer requires a prior knowledge of SSRS Reports Developing and Deploying.
[Its consider in prior that A Programmer is aware about 1),2),3),4) & 5) Points]
1). MIS.rdl File is uploaded over SSRS.
2). form_Report_Stock.aspx & form_Report_Stock.aspx.cs Both Page are well coded including ReportViewer Control.
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=18.104.22.168, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>
Inside Page Load event of write following code:
if (!IsPostBack && !IsCallback)
parameters.Add(new ReportParameter("Connection_String",str_Cn)); //P04Name may Contain Connection String
You need to download the ReportServiceUtilities.cs Class.
Also, Note to confirm following settings over SSRS:
You will be able to set the SSRS Report Credentials Dynamically.
For any doubts please Leave comments,
I will try to revert ASAP for any issue.