Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. string folder = System.Configuration.ConfigurationManager.ConnectionStrings["rptfolder"].ProviderName;
  2. string reportURL = "";
  3. reportURL = System.Configuration.ConfigurationManager.ConnectionStrings["rpturl"].ProviderName;
  4.  
  5. ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
  6. ReportViewer1.ServerReport.ReportServerUrl = new Uri(reportURL);
  7. ReportViewer1.ServerReport.ReportPath = folder + "MileageReport";
  8. //ReportViewer1.ServerReport.ReportPath = folder + "testReport";
  9. //added by nilesh
  10. IReportServerCredentials irsc = new ReportCredentials(UserName, Password, System.Configuration.ConfigurationManager.ConnectionStrings["domain"].ProviderName);
  11. ReportViewer1.ServerReport.ReportServerCredentials = irsc;
  12. // bool isauthenticated = ReportViewer1.ServerReport.ReportServerCredentials.ImpersonationUser.IsAuthenticated;
  13. UserDataClass.LogError(userData.userId, "Not Error " + " UserName " + UserName + " Password " + Password + " Domain " +
  14. System.Configuration.ConfigurationManager.ConnectionStrings["domain"].ProviderName
  15. + " ReportPath " + ReportViewer1.ServerReport.ReportPath + " reportURL " + ReportViewer1.ServerReport.ReportServerUrl );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement