Crystal Report with 4 linked subreports not working

I have created 4 reports that return the required data. I am using version 8.5 because of older front end Crystal Enterprise 8.5 necessities.  All reports have parameters START DATE and END DATE that query dates in various date fields of SQL tables.  I have imported all reports into one and created links.  When I go to Design for the main report the Execute/Refresh icon is grayed out.  I notice that in the subreports there are ?START DATE and ?END DATE as well as Pm-?START DATE and Pm-?END DATE.  Does one of those sets need to be removed?


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The ?pm parameters were added when you linked the subreports.

You probably want to change them and link directly to the subreport parameters from the main report.

Does the main report have a data source?  Does the main report have any parameters?

My though would be to use one of the subreports as the main report then link the other 3 in to it.

Do you call the report from a (.NET ?) program, or do you run it standalone in CR ?

If you call it in a program, you'll have to set the data source separately for each subreport. The most simple way to do that - if the main report uses the same data source as the subreports - is
ReportDocument objRpt;
crystalReportViewer1.ReportSource = objRpt;
if (objRpt.Subreports.Count > 0)
    foreach (ReportDocument objSubRep in objRpt.Subreports)

Open in new window

(this example is free written as guideline, it may not be syntactic perfect ...).

It might look weird on the first glance that subreports doesn't share the parent report's data source by default, but that behaviour offers extremely flexible ways of reporting.
That method won't work with CR8.5.  The methods were changed in CR9.

HTML5 and CSS3 Fundamentals

Build a website from the ground up by first learning the fundamentals of HTML5 and CSS3, the two popular programming languages used to present content online. HTML deals with fonts, colors, graphics, and hyperlinks, while CSS describes how HTML elements are to be displayed.

gibneytAuthor Commented:
OK, I will make a copy of one of the reports and use it to import the other reports into minus the original as it will already be in there.  Is there an order of precedence?  Am I putting the imported reports into the Details or Footer section?
I believe the subreports should go into the report header or the report footer depending on the order you want them.

I would use the report you want first as the main report then add the other 3 to the report footer.
You will need to create a report footer for each subreport
Right click the report footer in the left margin
Repeat 2 more times so you have RF1A, RF1B, and RF1C
Put 1 subreport in each section

gibneytAuthor Commented:
I am down to two reports to add so added two report footers and imported the reports and placed in their respective footers.  At the Start Date and End Date prompts I have 3 sets of prompts to complete and when I do the reports come up empty.  Do I need to rework the Start Date and End Date parameters in the two subreports?  Do I get rid of their original Start Date and End Date and keep the Pm-* new parameters?

In the subreports keep the parameters that were created with the report

In the main report choose the StartDate parameter for the link
In the subreport choose the StartDate parameter not the one that starts pm

Make all prompts for a STARTDATE are identical.  Same for the ENDDATE parameters


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gibneytAuthor Commented:
Yes, that works perfectly.  Thanks again.

Now the report headers don't play well.  The main report header is at the top of the page and every page thereafter and the subreport headers only print once at the top of their first page.  I would like a generic header on the first page and headers on each page that are specific to the current report displayed.  Should I open a new question for this latest hurtle and mark this one answered?

That would be the way to go.

gibneytAuthor Commented:

Thanks again for the little nuggets.  Works to spec!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.