Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code> protected void btnSubmit_Click(object sender, EventArgs e) { string pstrType; pstrType = Request.QueryString["Type"]; LoadReport(); } public class CustomReportCredentials : Microsoft.Reporting.WebForms.IReportServerCredentials { // local variable for network credential. 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; // not use ImpersonationUser } } public System.Net.ICredentials NetworkCredentials { get { // use NetworkCredentials return new NetworkCredential(_UserName, _PassWord, _DomainName); } } public bool GetFormsCredentials(out Cookie authCookie, out string user, out string password, out string authority) { // not use FormsCredentials unless you have implements a custom autentication. authCookie = null; user = password = authority = null; return false; } } void LoadReport() { string strCompanyName = objSession.SelCompanyName; string strHeading = ""; string strBranchName = objSession.SelBranchName; rptvwMain.ProcessingMode = ProcessingMode.Remote; rptvwMain.ServerReport.ReportServerCredentials = new CustomReportCredentials(AppConfig.ReportServerUserName, AppConfig.ReportServerPassword, AppConfig.ReportServerDomain); string strReportServerUrl = AppConfig.ReportServerUrl + AppConfig.ReportServerFolder; rptvwMain.ServerReport.ReportServerUrl = new Uri(strReportServerUrl); List&lt;ReportParameter&gt; parameters = new List&lt;ReportParameter&gt;(); if (pstrType == "OB") { strHeading = "Ledger Opening Balance"; rptvwMain.ServerReport.ReportPath = "/Account/OpeningBalance"; } parameters.Add(new ReportParameter("FyId", Convert.ToInt16(objSession.FyId).ToString())); parameters.Add(new ReportParameter("AccountGroupId", cmbAccountGroup.SelectedValue)); parameters.Add(new ReportParameter("LedgerId", cmbLedgerId.SelectedValue)); parameters.Add(new ReportParameter("BranchId", Convert.ToInt64(objSession.BranchId).ToString())); parameters.Add(new ReportParameter("StDate", Convert.ToDateTime(RadDtpFromDate.SelectedDate).ToString())); parameters.Add(new ReportParameter("EnDate", Convert.ToDateTime(RadDtpToDate.SelectedDate).ToString())); parameters.Add(new ReportParameter("CompanyName", strCompanyName.ToString())); parameters.Add(new ReportParameter("BranchName", strBranchName.ToString())); parameters.Add(new ReportParameter("Heading",strHeading.ToString())); rptvwMain.ServerReport.SetParameters(parameters); rptvwMain.ServerReport.SetDataSourceCredentials(new[] { new DataSourceCredentials() { Name =AppConfig.ReportServerDataSource , UserId = AppConfig.ReportServerDSUserName, Password = AppConfig.ReportServerDSPassword } }); rptvwMain.ShowZoomControl = true; rptvwMain.ServerReport.Refresh(); } } </code></pre> <p>Try this code........ May this code is help for you ??????</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload