<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Index was outside the bounds of the array in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Index-was-outside-the-bounds-of-the-array/m-p/2222184#M22015</link>
    <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are using&amp;nbsp;&lt;A href="https://docs.microsoft.com/sql/reporting-services/create-deploy-and-manage-mobile-and-paginated-reports?view=sql-server-ver15" target="_blank" rel="noopener"&gt;SQL Server Reporting Services (SSRS)&lt;/A&gt;, instead of&amp;nbsp;&lt;A href="https://docs.microsoft.com/power-bi/report-server/get-started" target="_blank" rel="noopener"&gt;Power BI Report Server (PBIRS)&lt;/A&gt;, right?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Icey_0-1638774108487.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/639617i9C93BBB12D397508/image-size/large?v=v2&amp;amp;px=999" role="button" title="Icey_0-1638774108487.png" alt="Icey_0-1638774108487.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, please post your blog on&amp;nbsp;&lt;A href="https://docs.microsoft.com/answers/topics/sql-server-reporting-services.html" target="_blank" rel="noopener"&gt;sql-server-reporting-services - Microsoft Q&amp;amp;A&lt;/A&gt; to get&amp;nbsp;professional and quick help on technical questions about SQL Server Reporting Services installation, configuration, design, performance and troubleshooting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Icey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Dec 2021 07:06:23 GMT</pubDate>
    <dc:creator>Icey</dc:creator>
    <dc:date>2021-12-06T07:06:23Z</dc:date>
    <item>
      <title>Index was outside the bounds of the array</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Index-was-outside-the-bounds-of-the-array/m-p/2218377#M22010</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Microsoft SQL Server 2017 Reporting Services - 14.0.600.1763 (x64)&lt;BR /&gt;Microsoft SQL Server 2017 - Database Server - 14.0.3421.10 (x64)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Index was outside the bounds of the array.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;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. ---&amp;gt; System.IndexOutOfRangeException: Index was outside the bounds of the array.&lt;BR /&gt;at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Guid batchId, Warning[]&amp;amp; Warnings)&lt;BR /&gt;at Microsoft.ReportingServices.Library.ReportingService2005Impl.SetReportDefinition(String Report, Byte[] Definition, Warning[]&amp;amp; Warnings)&lt;BR /&gt;at Microsoft.ReportingServices.Library.ReportingService2010Impl.SetItemDefinition(String ItemPath, Byte[] Definition, String expectedItemTypeName, Property[] Properties, Warning[]&amp;amp; Warnings)&lt;BR /&gt;at Microsoft.ReportingServices.WebServer.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties, Warning[]&amp;amp; Warnings)&lt;BR /&gt;at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)&lt;BR /&gt;at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)&lt;BR /&gt;at Microsoft.SqlServer.ReportingServices2010.ReportingService2010.SetItemDefinition(String ItemPath, Byte[] Definition, Property[] Properties)&lt;BR /&gt;at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SoapMethodWrapper`1.ExecuteMethod(Boolean setConnectionProtocol)&lt;BR /&gt;at Microsoft.SqlServer.ReportingServices2010.RSConnection2010.SetItemDefinition(String itemPath, Byte[] definition, Property[] properties)&lt;BR /&gt;at Microsoft.ReportingServices.Portal.Services.SoapProxy.SoapAuthenticationHelper.ExecuteWithWindowsAuth[TReturn](SoapHttpClientProtocol soapClient, IPrincipal userPrincipal, Func`1 func)&lt;BR /&gt;at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.UpdateReport(IPrincipal userPrincipal, String origItemPath, Report item, Boolean renameOrMove, String[] delta)&lt;BR /&gt;at Microsoft.ReportingServices.Portal.Repositories.CatalogItemRepository.Update(IPrincipal userPrincipal, String origItemPath, CatalogItem catalogItem, String[] delta)&lt;BR /&gt;at Microsoft.ReportingServices.Portal.ODataWebApi.V2.Controllers.CatalogItemsController.PutEntity(String key, CatalogItem entity)&lt;BR /&gt;at Microsoft.ReportingServices.Portal.ODataWebApi.Controllers.Reflection.EntitySetReflectionODataController`1.Put(ODataPath oDataPath, T value)&lt;BR /&gt;at lambda_method(Closure , Object , Object[] )&lt;BR /&gt;at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.&amp;lt;&amp;gt;c__DisplayClass10.&amp;lt;GetExecutor&amp;gt;b__9(Object instance, Object[] methodParameters)&lt;BR /&gt;at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)&lt;BR /&gt;--- End of stack trace from previous location where exception was thrown ---&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;From what I can tell, SSRS does not like the IF statements when I try to upload the report from a Report Builder session.&lt;/P&gt;&lt;P&gt;Need assistance with converting IF block/blocks to CASE statements:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;declare @startDate as datetime&lt;BR /&gt;declare @endDate as datetime&lt;/P&gt;&lt;P&gt;declare @currentMonth int&lt;/P&gt;&lt;P&gt;select @currentMonth = datepart(mm, getdate())&lt;/P&gt;&lt;P&gt;--Show the current last week for the month.&lt;BR /&gt;if @wkStartDate is null and @wkEndDate is null&lt;BR /&gt;begin&lt;BR /&gt;if @currentMonth = @monthName&lt;BR /&gt;begin&lt;BR /&gt;select @startDate = DATEADD(wk, 0, DATEADD(wk, DATEDIFF(wk, 0,getdate()), -2))&lt;BR /&gt;select @endDate = dateadd(dd, 6, @startDate)&lt;BR /&gt;end&lt;BR /&gt;--Show the last week of the month that was choosen.&lt;BR /&gt;if @currentMonth &amp;lt;&amp;gt; @monthName&lt;BR /&gt;begin&lt;BR /&gt;select @endDate = max(TheDate) from hlxlookup.dbo.Lookup_date_calendar where datepart(yyyy, TheDate) = @year AND DATEPART(mm, TheDate) = @monthName&lt;BR /&gt;select @startDate = TheDate from hlxlookup.dbo.Lookup_date_calendar where TheDate &amp;lt; @endDate and TheDayOfWeek = 7&lt;BR /&gt;end&lt;BR /&gt;end&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;else&lt;BR /&gt;begin&lt;BR /&gt;select @startDate = @wkStartDate&lt;BR /&gt;select @endDate = @wkEndDate&lt;BR /&gt;end&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Dec 2021 15:10:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Index-was-outside-the-bounds-of-the-array/m-p/2218377#M22010</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-02T15:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Index was outside the bounds of the array</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Index-was-outside-the-bounds-of-the-array/m-p/2222184#M22015</link>
      <description>&lt;P&gt;Hi&amp;nbsp;@Anonymous&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You are using&amp;nbsp;&lt;A href="https://docs.microsoft.com/sql/reporting-services/create-deploy-and-manage-mobile-and-paginated-reports?view=sql-server-ver15" target="_blank" rel="noopener"&gt;SQL Server Reporting Services (SSRS)&lt;/A&gt;, instead of&amp;nbsp;&lt;A href="https://docs.microsoft.com/power-bi/report-server/get-started" target="_blank" rel="noopener"&gt;Power BI Report Server (PBIRS)&lt;/A&gt;, right?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Icey_0-1638774108487.png" style="width: 999px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/639617i9C93BBB12D397508/image-size/large?v=v2&amp;amp;px=999" role="button" title="Icey_0-1638774108487.png" alt="Icey_0-1638774108487.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If so, please post your blog on&amp;nbsp;&lt;A href="https://docs.microsoft.com/answers/topics/sql-server-reporting-services.html" target="_blank" rel="noopener"&gt;sql-server-reporting-services - Microsoft Q&amp;amp;A&lt;/A&gt; to get&amp;nbsp;professional and quick help on technical questions about SQL Server Reporting Services installation, configuration, design, performance and troubleshooting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Icey&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 07:06:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Index-was-outside-the-bounds-of-the-array/m-p/2222184#M22015</guid>
      <dc:creator>Icey</dc:creator>
      <dc:date>2021-12-06T07:06:23Z</dc:date>
    </item>
    <item>
      <title>Re: Index was outside the bounds of the array</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Index-was-outside-the-bounds-of-the-array/m-p/2223414#M22033</link>
      <description>&lt;P&gt;Icey,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I posted to the other thread, thanks for the guidance on where to post for my topic/issue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;DDTWilson&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 17:15:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Index-was-outside-the-bounds-of-the-array/m-p/2223414#M22033</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-12-06T17:15:44Z</dc:date>
    </item>
  </channel>
</rss>

