I was able to revert back to an earlier version of Report Builder (v15.0.900.71), make the needed changes to the .RDL file and upload successfully to the Report Server.
Which can be found here, for those that may need it:
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Using Report Builder v15.0.19611.0.
Getting "Index was outside the bounds of the array" errors when attempting to upload the .rdl file to the SSRS Server.
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.SoapMethodWrapper1.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.EntitySetReflectionODataController1.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
I was able to revert back to an earlier version of Report Builder (v15.0.900.71), make the needed changes to the .RDL file and upload successfully to the Report Server.
Which can be found here, for those that may need it:
Hi @Anonymous ,
The exception that is thrown when an attempt is made to access an element of an array or collection with an index that is outside its bounds. An IndexOutOfRangeException exception is thrown when an invalid index is used to access a member of an array or a collection, or to read or write from a particular location in a buffer.
I refer to the thread:https://learn.microsoft.com/en-us/dotnet/api/system.indexoutofrangeexception?view=net-6.0
And the statement you paste,what does it used for ,is it a dataset ? Can you paste all your statement ,for the statement I tested on my report builder ,It can‘t work.
Best Regards,
Isabella
If the answer is the right solution, please click "Accept Answer" and upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.