How to walk through the collection of subreports in Crystal Reports 2008?

Posted on 2010-01-05
Last Modified: 2013-12-17
How to walk through the collection of subreports in Crystal Reports 2008?
Question by:Sovereign

    Author Comment

    Hi, I have the report with lots of sub-reports within.  
    How can I walk through the collection of sub-reports in main report? I need this to change the data source for each sub report.  

    Author Comment

    Sorry for comment. This site fails with FF

    Accepted Solution

    Thanks, I have found the solution

    ReportDocument reportDocument = new ReportDocument();
    foreach (ReportDocument subreportDocument in reportDocument.Subreports) {   
      // do something here

    Open in new window


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now