Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parent rows w/no Children Disappear after Summary

Status
Not open for further replies.

tonylmiller

Programmer
Apr 18, 2002
16
US
I am using Crystal Reports that came with Visual Studio.NET. I am reporting from an ADO.NET relational dataset. Some of my parent records do not have child records (some agencies do not have any personnel). Everything is fine until I try to count the personnel (child records). When I put in a summary (count) field for counting the personnel, the agencies (parent) without personnel (child) do not show up anymore. In other words, I get no counts of 0, even though they exist. All of the parent (agencies) with children (personnel) show up fine.

Any ideas? TIA.

Tony Miller
 
Sounds like you're losing the Left Outer, perhaps because you have a condition on the child table. This is always the case if you filter on the child table, the parents will disappear.

Try counting where the join field is null, and subtract from the count of the parent records.

-k
 
I already have the dataset and I am just inserting a summary field. Please be more specific about your suggestion to count where the join field is null and subtract from the count of the parent records. I do not understand what you mean. There are multiple parent records that have no child records.

Thanks for your help!

Tony
 
Perhaps you could flesh out what this recordset is, and how you're passing it to CR?

-k
 
I am passing an ADO.NET dataset which is linked through an agencyID field in both tables. The way I am passing the dataset in C# is:
AgencyList.SetDataSource(dataSet);

AgencyList is an instance of a report which I have defined. The records have been joined and filtered in the database, so I want to report the entire dataset; I do not need to do any filtering or joining or anything to the data. All the parent records show up until I add a count summary field. Then the parent records that do not have any child records no longer appear at all.

Thanks again!

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top