title: SSRS footer with info about devided chapters
body: <p>I have made the report which divides into several chapters due to parameter. In parameter we type numbers of last row in the chapter. So it looks like this:</p>
  
  <p>If we bring in parameter “100; 200; 400” and overall report contains 1000 rows, it will create 4 chapters: 1-100, 101-200, 201-400 and 401-1000. I used this report code to do this:</p>
  
  <pre><code>Dim ggg As Integer=0
  Function Set_ggg(a as Integer) as integer
      ggg=ggg+a
      return ggg
  End Function
  
  Function Get_ggg() as Integer
      return ggg
  End Function 
  
  Function Null_ggg() as Integer
      ggg=0
      return ggg
  End Function 
  
  Function nGr(n as Integer) as Integer
      Dim prev as Integer
      Dim t as Integer
      Dim i As Integer
      Dim UsedN as Integer()={0}
      prev=0
      For i = 0 To Report.Parameters!N_Sprav.Value.GetUpperBound(0) 
          If prev&lt;n and n&lt;=Report.Parameters!N_Sprav.Value(i) Then  'and Array.IndexOf(UsedN, n)=-1 
              exit for
          Else 
              prev=Report.Parameters!N_Sprav.Value(i)
          End If
      Next 
  
      UsedN(UsedN.GetUpperBound(0))=n
  
      ReDim Preserve UsedN(UsedN.GetUpperBound(0)+1)
      if IsNothing(i) then
          i=0
      End if
      Return i
  End Function
  </code></pre>
  
  <p>Now I need to do the footer after every chapter with expression where number of rows and range of it must be displayed. For foregoing example it must display: 100 rows from #1 to #100, 100 rows from #101 to #200, 200 rows from #201 to 400 and 600 rows from #401 to #1000, respectively.</p>
  
  <p>I succeeded to display count of rows in this way: <code>CStr(Count(Fields!ID__з_п_ок.Value,"Gr1"))</code></p>
  
  <p>But I have no idea how to do “from # to #” It seems to be easy, but I can’t find it out.</p>