Crystal Reports: Passing Parameters to SubReports > Report goes into infinite loop

Posted on 2011-05-06
Last Modified: 2012-05-11
Crystal Reports: Passing Parameters to SubReports > Report goes into infinite loop and keeps spewing the same data over and over until I hit the stop icon.  

Report > Select Expert > Record

Main Report:
{INVOICE.INV_DATE} in {?ReportStartDate} to {?ReportEndDate}

Each of three SubReports:
{INVOICE.INV_DATE} in {?Pm-?ReportStartDate} to {?Pm-?ReportEndDate}
Each SubReport contains the exact same statement.

If I run the Subs separately, I get one copy of each set of data. Perfect.

If I run the Main Report, I get into the loop where I get infinite copies of each SubReport, page after page. Not perfect.  

Any clue as to how I'm getting into this loop?  Or more importantly, how I can eliminate the looping?  Image of Edit > Subreports Links...dialog box
Question by:cgettel
    LVL 100

    Accepted Solution

    Where do you have the subreports?

    Are you expecting 1 run of each subreport for the entire report?
    If so they should be in the report header or the report footer.

    If you need 1 run for each record (detail section) then you should link on something that identifies the detail record in addition to the date range

    Similarly if you have groups.  You can put it in the group header or footer and link it on the group field


    Author Closing Comment

    I moved the subs to the footer. That gave me 70 blank pages then a single copy of each subreport.

    I suppressed  the details. And now the report is perfect.

    Many thanks mlmcc!

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
    Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    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

    20 Experts available now in Live!

    Get 1:1 Help Now