Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Index was outside the bounds of the array

 

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

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

You are using SQL Server Reporting Services (SSRS), instead of Power BI Report Server (PBIRS), right?

Icey_0-1638774108487.png

 

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.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Icey,

 

I posted to the other thread, thanks for the guidance on where to post for my topic/issue.

 

Regards,

 

DDTWilson

Icey
Community Support
Community Support

Hi @Anonymous ,

 

You are using SQL Server Reporting Services (SSRS), instead of Power BI Report Server (PBIRS), right?

Icey_0-1638774108487.png

 

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.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.