public void OnInitReportOptions(ReportViewerOptions reportOption)
{
reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("username","password");
reportOption.ReportModel.DataSourceCredentials.Add(new DataSourceCredentials("NG ", "qa","password", "Data Source=DEVGXSQL01;Initial Catalog=Dev_Test;User Id=ssrs1;password=password; Encrypt=True;", false));
} |
reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("username ","password");
reportOption.ReportModel.DataSourceCredentials.Add(new DataSourceCredentials("NG ", "qa", "password", "Data Source=DEVGXSQL01;Initial Catalog=Dev_Test;", false)); |
I have checked in my datasource property and its set the datasource username and password in "Use this User name and password" option in datasource property of report file.
so i have put below changes in my code
reportOption.ReportModel.ReportServerCredential = new System.Net.NetworkCredential("username ","password");
reportOption.ReportModel.DataSourceCredentials.Add(new
DataSourceCredentials("NG ", "qa", "password", "Data Source=DEVGXSQL01;Initial Catalog=Dev_Test;", false));
but its still getting same error of Login failed for user.
I think there is some misunderstanding,
can you please clear below points?
1) If i remove below line from Init method, error is still getting same.
//reportOption.ReportModel.DataSourceCredentials.Add(
new DataSourceCredentials("NG ", "qa", "password", "Data Source=DEVGXSQL01;Initial Catalog=Dev_Test;", false));
|
We suspect the mentioned problem occurs when the incorrect credential detail (username and password) passed for the “NG” datasource in WebAPI controller. So we request you to set the correct Credential (username and password) detail for datasource value in webAPI to avoid the mentioned problem at your end.
We have prepared a ReportViewer sample to load SSRS report and it can be downloaded from below location,
Sample: http://www.syncfusion.com/downloads/support/directtrac/general/ze/ReportSample1459258080.zip
If the problem still, persist then revert the shared sample with issue reproducible procedure to validate the mentioned problem at our end. | |
2) I have seen in other blogs, we can pass DataSourceCredentials in List also.
public DataSourceCredentials(string name, string userId, string passWord, string connectionString, bool integratedSecurity);
In above method and its arguments, what should be pass in "name" argument?
its a datasource name(which is from shared datasource) or a dataset name(which is used in report to fetch values) or anything else?
|
The string name argument present in DatasourceCredentail method is used to pass a data source name of the Report as shown in below screenshot and code example,
| |
3) "I is undefined" error will fire in console more than one times from ej.web.all.min.js
|
The mentioned problem occurred in “ej.web.all.min.js” script file when initialziting the ReportViewer control. We have tested the current “ej.web.all.min.js” script file and it’s working properly at our end. So can you please share the “ej.web.all.min.js” script file referred in your application to validate the mentioned issue at our end.
|
Hello Yuvaraj,
Hello Yuvraj,
Your sample is not working.
As per your reply i have put dll reference in my application but its not working.
Below is detailed description of our existing SSRS reports.
Please find attachment for custom report style which we have made for use while SSRS report creation.
If attached project not build than copy its dll to "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PrivateAssemblies\" folder .
and give its dll reference while make SSRS report like below