Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
Microsoft SQL Server 2017 Reporting Services - 14.0.600.1763 (x64)
Microsoft SQL Server 2017 - Database Server - 14.0.3421.10 (x64)
Index was outside the bounds of the array.
RSPortal!reportserverwebapp!RSPortal.exe!3d!12/01/2021-21:06:18:: e ERROR: OData exception occurred: System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: An unexpected error occurred in Report Processing. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Guid batchId, Warning[]& Warnings)
at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Warning[]& Warnings)
at Microsoft.ReportingServices.Library.ReportingService2010Impl.SetItemDefinition(String ItemPath, Byte[] Definition, String expectedItemTypeName, Property[] Properties, Warning[]& Warnings)
at Microsoft.ReportingServices.WebServer.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]& Warnings)
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 Microsoft.SqlServer.ReportingServices2010.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties)
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod(Boolean setConnectionProtocol)
at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetItemDefinition(String itemPath, Byte[] definition, Property[] properties)
at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapAuthenticationHelper.ExecuteWithWindowsAuth[TReturn](SoapHttpClientProtocol soapClient, IPrincipal userPrincipal, Func`1 func)
at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.UpdateReport(IPrincipal userPrincipal, String origItemPath, Report item, Boolean renameOrMove, String[] delta)
at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.Update(IPrincipal userPrincipal, String origItemPath, CatalogItem catalogItem, String[] delta)
at Microsoft.ReportingServices.Portal.ODataWebApi.V2.Controllers.CatalogItemsController.PutEntity(String key, CatalogItem entity)
at Microsoft.ReportingServices.Portal.ODataWebApi.Controllers.Reflection.EntitySetReflectionODataController`1.Put(ODataPath oDataPath, T value)
at lambda_method(Closure , Object , Object[] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
--- End of stack trace from previous location where exception was thrown ---
From what I can tell, SSRS does not like the IF statements when I try to upload the report from a Report Builder session.
Need assistance with converting IF block/blocks to CASE statements:
declare @startDate as datetime
declare @endDate as datetime
declare @currentMonth int
select @currentMonth = datepart(mm, getdate())
--Show the current last week for the month.
if @wkStartDate is null and @wkEndDate is null
begin
if @currentMonth = @monthName
begin
select @startDate = DATEADD(wk, 0, DATEADD(wk, DATEDIFF(wk, 0,getdate()), -2))
select @endDate = dateadd(dd, 6, @startDate)
end
--Show the last week of the month that was choosen.
if @currentMonth <> @monthName
begin
select @endDate = max(TheDate) from hlxlookup.dbo.Lookup_date_calendar where datepart(yyyy, TheDate) = @year AND DATEPART(mm, TheDate) = @monthName
select @startDate = TheDate from hlxlookup.dbo.Lookup_date_calendar where TheDate < @endDate and TheDayOfWeek = 7
end
end
else
begin
select @startDate = @wkStartDate
select @endDate = @wkEndDate
end
Solved! Go to Solution.
Hi @Anonymous ,
You are using SQL Server Reporting Services (SSRS), instead of Power BI Report Server (PBIRS), right?
If so, please post your blog on sql-server-reporting-services - Microsoft Q&A to get professional and quick help on technical questions about SQL Server Reporting Services installation, configuration, design, performance and troubleshooting.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey,
I posted to the other thread, thanks for the guidance on where to post for my topic/issue.
Regards,
DDTWilson
Hi @Anonymous ,
You are using SQL Server Reporting Services (SSRS), instead of Power BI Report Server (PBIRS), right?
If so, please post your blog on sql-server-reporting-services - Microsoft Q&A to get professional and quick help on technical questions about SQL Server Reporting Services installation, configuration, design, performance and troubleshooting.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
3 | |
2 | |
2 | |
1 | |
1 |
User | Count |
---|---|
4 | |
4 | |
4 | |
4 | |
3 |