SSRS report with PowerPivot datasource - 401 Unauthorized
Hello together,
I have a tricky issue and hope that you can help me:
Problem: I want to build a Reporting Services Report with a PowerPivot datasource with Report Builder 3.0. When I try to access the datasource via Report Builder I get the error: The remote server returned an error: 401 - Unauthorized.
The PowerPivot file lies on a Sharepoint 2013 with Kerberos authentification.
Logs: Here are some sample log entries after getting the error:
Token Cache: Could not find SPSite for 'sharepoint.com/_vti_bin/PowerPivot/secureredirector.svc/?DataSource=sample.xlsx'.
Exception trying get context compatibility level: System.IO.FileNotFoundException: The site sharepoint.com/_vti_bin/PowerPivot/secureredirector.svc/?DataSource=sample.xlsx could not be found in the Web application SPWebApplication Name=sharepoint.com.
Non-OAuth request. IsAuthenticated=True, UserIdentityName=0#.w|user, ClaimsCount=118
Notes: I tried some solutions from the internet, where the web.config from PowerPivot has to be changed. Also I saw that it could be Kerberos related, but no detailed information where to start as the other features are working fine. SPNs
and Delegations are configured. And changing to NTLM is not an option as this is a multi-server platform.
I hope that you have another idea, where the problem could be.
Kind regards,
Robin
Has noone an idea?
Similar Messages
-
We have a hosted SSRS server and we access it's reports using the reportviewer in an ASP.net application.
We are getting the error: The request failed with HTTP status 401: Unauthorized. When trying to run one of the reports. I have confirmed that the login details work when logging into the report manager page directly.
I have implemented an instance of IReportServerCredentials in a separate class (below) and I call it from the page before it tries to access the report. I'm not sure if this is all I need but can't seem to find any other info.
I have managed to gain access connecting to the external server from my PC and accessed the report, but when I promote the code to production and run it from there on my local PC I get the unauthorized message again: the request failed with http status
401: unauthorized
The class:
[Serializable]
public sealed class MyReportServerCredentials :
IReportServerCredentials
public WindowsIdentity ImpersonationUser
get
// Use the default Windows user. Credentials will be
// provided by the NetworkCredentials property.
return null;
public ICredentials NetworkCredentials
get
// Read the user information from the Web.config file.
// By reading the information on demand instead of
// storing it, the credentials will not be stored in
// session, reducing the vulnerable surface area to the
// Web.config file, which can be secured with an ACL.
// User name
string userName =
ConfigurationManager.AppSettings
["MyReportViewerUser"];
if (string.IsNullOrEmpty(userName))
throw new Exception(
"Missing user name from web.config file");
// Password
string password =
ConfigurationManager.AppSettings
["MyReportViewerPassword"];
if (string.IsNullOrEmpty(password))
throw new Exception(
"Missing password from web.config file");
// Domain
string domain =
ConfigurationManager.AppSettings
["MyReportViewerDomain"];
return new NetworkCredential(userName, password);
public bool GetFormsCredentials(out Cookie authCookie,
out string userName, out string password,
out string authority)
authCookie = null;
userName = null;
password = null;
authority = null;
// Not using form credentials
return false;
The call to the class, just before the report is run:
if (GetConnection.GetConnectionString().ToString().Contains("IP of external server removed"))
invoiceviewer.ServerReport.ReportServerCredentials = new MyReportServerCredentials();
We have tried so many things here, we don't even care whether the server authenticates or not but it appears to be as standard. Our hosting company has also drawn a blank and changed so many settings to no avaHi Nasa1999,
According to your description, you are getting the error: The request failed with HTTP status 401: Unauthorized when you access the report using the ReportViewer in an ASP.net application.
Regarding the 401 error, it could cause by the Service Principal Name(SPN) for the account the Reporting Services is running under hasn’t been registered when the Reporting Services is configured to use Kerberos authentication. So in your scenario,
please check if you are using Kerberos authentication. If that is a case, please make sure SPN is configured correctly. For more information, please refer to the similar thread:
The request failed with HTTP status 401: Unauthorized. in SSRS.
If issue persists, please check the Reporting Service error log (default location: %programfiles%\Microsoft SQL Server\<SQL Server Instance>\Reporting Services\LogFiles) around the time that the error message thrown out.
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
SSRS 2012 - The request failed with HTTP status 401: Unauthorized.
I have SSRS Reporting Services 2012 load balanced on two servers.
Both servers are running Windows Server 2012 R2.
I have a Web Application that renders reports by utilizing this SSRS Reporting Services 2012.
When the application generates a report using load balancing I get error the message, “The request failed with HTTP status 401: Unauthorized.”
However, using only one reporting server, the application is able to render the report just fine.
It seems that when the requests are shared between the servers the problem occurs.
One solution is to configure Load Balancing with “Source IP” persistence.
This seems to work. I believe this is a “sticky” session.
With this Load Balancing configuration, the application can render the report just fine.
(However, I have not done complete testing.)
The problem occurs when calling the service ListChildren(string, bool ) on SSRS.
I have been researching online. I tried modifying the registry on the servers based on online articles (see below.)
Here are some articles I have looked at.
http://msdn.microsoft.com/en-us/library/cc281307(v=sql.110).aspx
http://blogs.msdn.com/b/lukaszp/archive/2008/07/18/reporting-services-http-401-unauthorized-host-headers-require-your-attention.aspx
http://blogs.msdn.com/b/lukaszp/archive/2008/07/18/reporting-services-http-401-unauthorized-host-headers-require-your-attention.aspx
Is there a better solution? Will Load Balancing with “Source IP” persistence be an acceptable solution? Is there a patch needed for the servers or SSRS? Please let me know.Hi GoGladiator,
Generally, "The request failed with HTTP status 401: Unauthorized" occurs when
The service account used to connect to the Report Server is not authorized.
The Reporting Services is configured to use Kerberos, however, we didn't register Service Principal Name (SPN) for the account the Reporting Services is running under.
So, to fix this issue, we can refer to the follow steps:
Make sure the user is able to connect to the Report Server.
If using Kerberos authentication, please make sure SPN is configured correctly. If using Kerberos authentication, please make sure SPN is configured correctly.
For more information about Kerberos Authentication and how to register SPN for a report server in Reporting Services, please see the articles below:
Configure Windows Authentication on the Report Server
Register a Service Principal Name (SPN) for a Report Server
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
I got the error "The request failed with HTTP status 401: Unauthorized." when I call the Reporting Service Web Service.
The code is very simple:
// Initialise the reporting service Web Service
this.RSWebService = new ReportingService2010();
// Pass windos authentication credentials to Web Service
this.RSWebService.Credentials = System.Net.CredentialCache.DefaultCredentials;
// List children
List<CatalogItem> reports = this.RSWebService.ListChildren(folder, false).ToList();
The SQL Server is installed on a different machine (say server A) from the Web server (say server B). We are using Windows Server 2003.
The code work fine for all the scenario below:
i) Run locally (XP) to call the web service on the sql server
ii) Provide the Network Credentials with the username, password, and domain when calling the web service
iii) If the web server and sql server is using same server (i.e. not distributed)
I'm using windows authentication and impersonation. Any idea?Hi Raymond,
If I understand correctly, the issue only happens in the environment that the web server is different with the SQL Server Reporting Services server. This means the web server is a remote server of the Report Server. Windows Integrated authentication is used
in this case. When running the web page, the 401 error occurs.
If so, it is actually a double hop issue. The double-hop problem will usually only be an issue to those of you who write some sort of web-based code (a web application or web service) that uses impersonation.
To fix the issue, we can configure kerberos authentication for the web application and the SQL Server Reporting Services.
Below is a great article that has delivered many solutions to fix the issue you met:
http://odetocode.com/articles/216.aspx
Additionally, you can read the following article to know more about double-hop:
http://blogs.technet.com/b/askds/archive/2008/06/13/understanding-kerberos-double-hop.aspx
http://blogs.msdn.com/b/knowledgecast/archive/2007/01/31/the-double-hop-problem.aspx
If you have any more questions, please feel free to ask.
Thanks,
Jin Chen
Jin Chen - MSFT
Thanks Jin. I believe this is the cause of the problem as well.
I tried to register the SPN but unfortunately it still doesn't work. I'm not sure whether I'm using the correct SPN name.
I have 3 reporting server instance on the SQL box. So the Web Service URL is like
http://Server:80/VirtualDirectoryDev,
http://Server:80/VirtualDirectoryTest and
http://Server:80/VirtualDirectoryStaging .
What's the SPN I need to register?
I tried
Setspn -a http/Server:80/VirtualDirectoryDev domain\account
and
Setspn -a http/aerver:80 domain\account.
But both of them are not working :( -
Ssrs 2008 r2 The request failed with HTTP status 401: Unauthorized.
hello,
I created a report from one user who is owner of sharepoint site ,where sharepoint foundation site is installed.
but when i tried to access that report from another machine with same user owner of the site ,i received the error message as
the request failed with http status 401 unauthorized.
please help.
thanksHi Krishnakumar_DeV,
The Reporting Services Web service must use Windows integrated authentication in SharePoint integrated mode. If it is set to Basic, Anonymous, or otherwise, it will not function as expected, if at all.
The HTTP 401 error may occur if the Reporting Services integration has been configured to use Windows authentication, while Kerberos authentication has not been configured correctly. In order to solve the problem, we can configure the data source to use
stored credentials or refer to the solutions in the "5.4 The request failed with HTTP status 401: Unauthorized" section of the following article:
http://msdn.microsoft.com/en-us/library/ee384252(v=sql.100).aspx
Hope this helps.
Regards,
Alisa Tang
Alisa Tang
TechNet Community Support -
The request failed with HTTP status 401: Unauthorized.
at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.GetSecureMethods()
at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.IsSecureMethod(String methodname)
at Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.LoadReport(String Report, String HistoryID)
at Microsoft.Reporting.WinForms.ServerReport.GetExecutionInfo()
at Microsoft.Reporting.WinForms.ServerReport.SetParameters(IEnumerable`1 parameters)
at Accounting.Reports.UI.FormReportPreview.LoadReport()
at Accounting.UI.FormBase.PreLoadReportComponents()
Please help me with this can't figure out, don't know how to troubleshoot this 5 days working on this error no changes so far, thanks in advance if u can figure it out....Hi willjohn520,
Based on your description, it seems that you are getting the error when you connect to report server reports in workstation. If in this scenario, the issue can be caused by “Host Header”(<foo>) in a URL that looks like http(s)://<foo>/reports
is neither the machine name nor the loop back IP address nor the machine's IP address.
For more details information about this issue, please refer to the following blog:
http://blogs.msdn.com/b/lukaszp/archive/2008/07/18/reporting-services-http-401-unauthorized-host-headers-require-your-attention.aspx
Hope this helps.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
"The request failed with HTTP status 401: Unauthorized"
Hi,
I'm trying to get both RSS feeds and SSRS reports on a web application which is having NTLM authentication without Kerberos. The catch is proxy setting, if I give <proxy autoDetect="false" /> in web.config of my sharepoint web
application SSRS reports will be rendered in SQL Server Report viewer perfectly (I deploy using BIDS), but RSS viewer webpart will not display my internet feeds. If I give
<proxy autoDetect="true" /> RSS feeds are displayed properly but SSRS report will throw the following error.
The request failed with HTTP status 401: Unauthorized.
Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Net.WebException: The request failed with HTTP status 401: Unauthorized.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[WebException: The request failed with HTTP status 401: Unauthorized.]
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +412862
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +300
Microsoft.SqlServer.ReportingServices2005.Execution.ReportExecutionService.ListRenderingExtensions() +53
Microsoft.SqlServer.ReportingServices2005.Execution.RSExecutionConnection.ListRenderingExtensions() +207
Microsoft.Reporting.WebForms.ServerReport.ListRenderingExtensions() +130
Microsoft.ReportingServices.SharePoint.UI.WebParts.ActionMenu.OnPreRender(EventArgs e) +180
System.Web.UI.Control.PreRenderRecursiveInternal() +108
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Control.PreRenderRecursiveInternal() +224
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3394
I tried to work around this by adding proxy settings with bypass list.
<system.net>
<defaultProxy useDefaultCredentials="true">
<proxy proxyaddress="http://<proxy IP address>:<port>" bypassonlocal="true" usesystemdefault="true" />
<bypasslist>
<add address="<my report server>" />
<add address="http://<report server>:8080/reportserver/" />
<add address="<IP of my report server>" />
</bypasslist>
</defaultProxy>
</system.net>
This makes RSS feed to work but SSRS throw the above error. I would need some advice from Microsoft on how to fix this.
Note: My sharepoint site cannot be anonymous. I have just once service account that runs sql server service, report service, sharepoint services etc. This account is local admin on all servers, has highest access on sql box, run SSRS web service and app
pools, etc.
I have four servers, 2 WFE in windows load balanced, 1 app server (running Central admin and report service in sharepoint integrated mode), 1 db server hosting all content and config dbs and report server db.
Regards,
Manoj
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3618Hi,
Thanks to share your post.
For the issue,
do you mean that the error happen with the use of NTLM authentication without Kerberos? If yes, the possible cause should be the lacking of Kerberos.
My suggestion is to implement the Kerberos authentication in your environment. You may check it and test it. For the detailed steps of implementing of the Kerberos:
http://blogs.msdn.com/b/martinkearn/archive/2007/04/23/configuring-kerberos-for-sharepoint-2007-part-1-base-configuration-for-sharepoint.aspx.
http://blogs.msdn.com/b/james_world/archive/2007/08/20/essential-guide-to-kerberos-in-sharepoint.aspx.
Hope this could help you!
Leo -
Service Clients failing with "The request failed with HTTP status 401: Unauthorized"
Hello,
We have implemented a solution using the SSRS web service clients as produced by the WSDLs. We have deployed the application on one server, and via the code we are calling the SSRS on another server (i.e., not using ReportViewer, etc.). We do
know that the user signed in has permissions since from the same staging server the Report Manager and Reports can both be accessed and viewed. However, it's only when we run the application and attempt to execute a report on the remote SSRS server that
we get the following error:
The request failed with HTTP status 401: Unauthorized. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at AMC.AssetTracker.Reporting.ReportExecution.ReportExecutionService.LoadReport(String Report, String HistoryID) at AMC.AssetTracker.Reporting.Report.GetReportByteArray() at AMC.AssetTracker.Reporting.Report.get_ReportStream()
at AMC.AssetTracker.Reporting.Report.get_GetWebUIDisplay() at AMC.AssetTracker.UserControls.AssetTrackerMain.btnGenerate_Click(Object sender, EventArgs e)
The credentials we have tried are the DefaultCredentials. One question I have is how do you use custom credentials if neither the DefaultCredentials or the DefaultNetworkCredentials work? Also, this service call does have to go through an ISA
server before reaching the SSRS server.
Any ideas?
Thanks.It sounds like Kerberos authentication is needed in your situation since it's not on the same box.
There is a one-hop limit with NTLM authentication.
For more info please see the link below:
http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/452e9627-cd8e-4709-bdd0-fbafcf9fd719
Hope this helps!
Thanks, Michael Mei -
" The request failed with HTTP status 401: Unauthorized." assembly webservice
Hi!
I have an assembly that calls a webpage for information to put in a table in SSRS. After struggling with the assembly that have been moved from a 2005 server to a 2012 server i finally got the reports to deploy and i can open them. But in the field where
the called information i supposed to be i get this error message.
How do i solve this problem?
Thanks in advance!
//A.Hi there,
Check the IIS logs on the web service server. Is the web page secured? What credentials are being passed to the web service? Turn on the report server trace logs and check them.
Some more info here, I find sysinternals.com tools very helpful in this case.
There are quite a few links with similar issue:
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/86ce6376-71cd-44fe-9480-fff103395d6b/web-service-request-failed-with-http-status-401-unauthorized-in-ssrs-2008-r2?forum=sqlreportingservices
http://forums.iis.net/t/1149741.aspx?Intermittently+getting+401+Access+Denied+with+Web+Service
http://technet.microsoft.com/en-us/library/ee384252(v=sql.100).aspx
http://technet.microsoft.com/en-us/library/cc281309.aspx
http://connect.microsoft.com/SQLServer/feedback/details/323214/the-request-failed-with-http-status-401-unauthorized
Compare the settings in the Reporting Services configuration files and service accounts for the old and new servers to see any discrepancies.
cheers,
Andrew
Andrew Sears, T4G Limited, http://www.performancepointing.com -
Error "The request failed with HTTP status 401: Unauthorized"
Dear All,
While running ssrs report using reportviewer I am getting following error as "The request failed with HTTP status 401: Unauthorized". I have also added required entry in registry and rebooted the server. But same issue appears. So, please help
me to resolve this.
Thanks in advanceHi dsddsadsa,
According to your description, when trying to running report from the report viewer control, the error "The request failed with HTTP status 401: Unauthorized" is thrown out.
While running report viewer control without impersonation setting, by default it will use the process identity which is Network Service (the AppPool identity is Network Service). Depending on the identity of the AppPool the app is running under, the identity
might be rejected. In your scenario, you may haven’t enable ASP.NET impersonation, you will get this exception. Please set up the following impersonation in the Web.config file, so that ASP.NET will use the configured user name and password to access the report
server:
<configuration>
<system.web>
<identity impersonate="true"
userName="domain\user"
password="password" />
Reference:
Request failed with HTTP status 401: Unauthorized (ReportViewer
control)
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu -
Post Author: nl11087
CA Forum: JAVA
A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
Reproduction:
1. create a database db1, create a table table1 with a String type column col1.
2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
Exception StackTrace:
com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
... 17 more
Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
... 23 more
Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
... 35 more
Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
... 36 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
... 48 more
- JRCAgent3 detected an exception: An error occured while exporting the report
at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)Post Author: nl11087
CA Forum: JAVA
A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
Reproduction:
1. create a database db1, create a table table1 with a String type column col1.
2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
Exception StackTrace:
com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
... 17 more
Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
... 23 more
Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
... 35 more
Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
... 36 more
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
... 48 more
- JRCAgent3 detected an exception: An error occured while exporting the report
at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source) -
Hello everyone,
I created following calculated member in MDX query. I am using it in one of the report parameter in dataset (single select dropdown list as report parameter).
WITH MEMBER [Measures].[ParameterCaption] AS
CoalesceEmpty([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION,'None')
I would like to display 'None' text at the top of the dropdown list values. So that when user selects 'None' then this parameter will not considered in MDX query else the selected National Account Code will be considered to filter report data. But,
the above return blank/empty value for [Customer].[National Account Code].& member though I specified 'None' as text in CoalesceEmpty function. Any advice would be appreciated.
Thanks, Ankit Shah
Inkey Solutions, India.
Microsoft Certified Business Management Solutions Professionals
http://www.inkeysolutions.com/MicrosoftDynamicsCRM.htmlHi Ankit,
It seems that you issue had been solved in your another thread.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/5a5becac-226f-428a-95b0-aaaa22733818/ssrs-report-with-tabular-model-create-a-dropdown-report-parameter-with-none-option-as-the-top?forum=sqlanalysisservices#0e51bf8c-a66c-4df5-a244-0147728fdfdb
iif([Customer].[National Account Code].CURRENTMEMBER.MEMBER_CAPTION="","None",[Customer].[National
Account Code].CURRENTMEMBER.MEMBER_CAPTION)
I marked this reply as answer, it will benefit to other members who have the similar issue.
Regards,
Charlie Liao
TechNet Community Support -
How to create a SSRS report with SharePoint 2013 team site's calendar?
Hi I have sp13 and SQL Data Rool (that brings up VS Shell 2010).
I need to build a report where the top part is to have a SP Team site's calendar for up coming week. The 2nd half would be a table with data from that same site. This report would then need to be embedded in a email that automatically sent to several
users on weekly basis.
I have the table data report created form the SP list. How can I get the calendar(display as a calendar that I see in the team site) on to the top part of this report?
Thank you.Please follow this article to write SSRS reports with data source as SharePoint list/calendars etc. All document libraries, list and calendars are derived from base list class so you can use any of this type as a data source
http://www.mssqltips.com/sqlservertip/2068/using-a-sharepoint-list-as-a-data-source-in-sql-server-reporting-services-2008-r2/
Once your SSRS report is developed, you have multiple ways to show it in SharePoint
- upload to SSRS server and show in sharepoint in a page viewer web part or simply open it as a link in new window
- configure SharePoint environment with integration to SSRS and upload report to SharePoint library. Display report in a web part page using SSRS web part.
Moonis Tahir MVP SharePoint,MCTS SharePoint 2010/2007, MCPD.net, MCSD.net, MCTS BizTalk 2006,SQL 2005 -
SSRS reporting with sharepoint list using Distinct and Multivalue parameters
i want create ssrs report with sharepoint list using ms-vs(2008). i want create Distinct multivalue parameters by using CAML query. There is any way we put CAML query where we use Distinct keyword and IN clause in CAML query... i hope all experts will
understand my poor English... sorry for poor English.. plz help meHi AsifMehmood,
Per my understanding you have create an SSRS report with SharePoint list, now you don’t know to create the distinct parameters by using CAML query, right?
For the CAML language doesn’t have any reserved word (or tag) to set this particular filter to remove duplicate results, but we can use the custom code to do this function. I have tested on my local environment and we can do that by create one hidden parameter(Param1)
to get all the values from the fields which will add the filter and then create another parameter(Param2) to get the distinct values based on the Param1, we use the custom code to do the deduplication.
Step by Steps information in below thread for your reference to create the parameters and the custom code:
"How to get distinct values of sharepoint column using SSRS"
Other similar thread for your reference:
https://audministrator.wordpress.com/2014/02/17/sharepoint-list-add-distinct-parameter-value/
If your problem still exists, please feel free to ask and also try to provide us more details information.
Regards
Vicky Liu -
Error http the request failed with http status 401: unauthorized
Hi,<o:p></o:p>
We are currently developing a Web Part for a
dashboard that connects from SharePoint 2010 to Project Server, we are trying
to connect via the PSI web service and fetch the project data but it is giving
the same error "The request failed with HTTP
status 401: Unauthorized". We are having a huge
issue with gaining authorization through the PSI and cannot figure out what the
problem is. We are using Project Server 2010, SharePoint 2010 and Visual Studio
2010.<o:p></o:p>
The person developing this has administrative
rights on both servers and it is running on his account. However, this is his
first experience with Project Server. Could some provide some guidance?<o:p></o:p>
Does anyone have any suggestions?<o:p></o:p>
Thanks,<o:p></o:p>
Aba
<o:p></o:p>Hi,
Have the credentials been set for the web service? Or are you trying to pass the credentials of the user accessing the webpart? In the second case, the user must have permissions in project server
It would be useful if you can share the part of the code that fails
Paul
Maybe you are looking for
-
Restrict Vendor line items display by Vendor authorization group
Hi Gurus, I have a requirement to restrict Vendor line item diplay for Tcode FBL1N, I have updated the Authorization object F_LFA1_BEK, its work fine if all the vendors have authorization, However it also display vendors whose auth. group is "BLANK"
-
Permission issues on network folders
I have local Keynote files that I use as a sales templates. My process it to open up one of these go to 'file->duplicate' and then make changes and save the file to a 'clients' folder on my windows server. I can duplicate the file just fine, but whe
-
Link to download LR4 SDK is broken
http://download.macromedia.com/pub/developer/lightroom/sdk/LR_4.1_831116_osx10_Debug_SDK.z ip gives a 404 error.
-
I Cant insert all values to the table But only Default Values r inserted?
Hai, i can insert only default values to the database. Other values are not shown in DB. Steps I have done so far: I have created EO based on VO and VO has the query : select * from emp. Attached to AM. That AM is attached to the Page. The page consi
-
Hello Experts, I am trying to develop a legacy data migration plan for Contracts with periodic billing plan and revenue recognition. Example of the scenario is given below: Customer signed a contract for one year starting 01/01/xxxx. Customer is bill