title: Crystal Reports: Is there a way to get effectively a subreport within a subreport?
body: <p><strong>UPDATE:</strong> I asked a more general question here:  <a href="https://stackoverflow.com/questions/2166963/can-i-do-two-levels-of-linking-in-crystal-reports">Can I do two levels of linking in Crystal Reports?</a></p>
  
  <p>I'm using Crystal Reports within VB.NET and Visual Studio 2005.</p>
  
  <p>I have a report with several subreports.  I'm setting List(Of MainStuff) as the data sources for the main report.  I'm setting List(Of SubreportStuff) as the data source for the subreport.  Each SubreportStuff has a key which links back to a particular MainStuff, so the report groups each MainStuff item with its related SubreportStuff items.  (Or, at the DB level, SubreportStuff items have a foreign key, which is the primary key in MainStuff.)</p>
  
  <p>Below shows the Load function for the dialog, which contains a CrystalReportsViewer.  In the Crystal Reports report editor (within VS 2005) I set the subreport link to pull only the related items into that part of the report.</p>
  
  <pre><code>Imports System.Windows.Forms
  
      Public Class dlgMyReport
          Private rpt As New MyReport
          Public theMainList As New List(Of MainStuff)
          Dim theSubreportList As New List(Of SubreportStuff)
  
          Private Sub dlgMyReport_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
              rpt.SetDataSource(theMainList)
  
              If theSubreportStuff.Count &gt; 0 Then
                  rpt.Subreports.Item("subReport").SetDataSource(theSubreportList)
              End If
  
              Me.StuffViewer.ReportSource = rpt
          End Sub
  
          ... ' other subs and functions
  
      End Class
  </code></pre>
  
  <p>This works fine.</p>
  
  <p>Now, though, what I'm needing to do is in essence the same thing, but pull items based on the keys in the <em>subreport</em> items.  This would mean having a subreport within a subreport.  However, it doesn't appear that I can do this (the option for inserting a subreport is grayed out when I try to insert in something that is already a subreport).</p>
  
  <p>Is there a way that I can accomplish this?  (Can I carry the subreport relationship down another level in some way?)</p>
  
  <p>Thanks as always!</p>