Erika, Ray, or Mark?
I am trying to hide a subreport under certain conditions, but can't seem to do it.
I have tried using Visibility() on the subreport element in the parent report, which passes the testing in designer. But, it causes a warning when I try to run the report, saying that the programming has failed to compile.
While attempting to approach the visibility issue from within the subform itself using @FormResultSetTotal("Children"), I found that the total is correct when I run the subform report by itself, but it is not correct when run within the parent report. When run within the parent report, the total always shows the total related to the first parent record's number of children. All subsequent records show the same value, even though the number of subrecords that are printing varies indicating the true number of subrecords. This is demonstrated in the report below.
Quote:------------------------------------------------------------------------
603-623-4564
Rick St Onge
Sally Prescott
1223 Mast Rd, PO Box 234
Manchester NH 03102-0234
Email: rsnfmly2432@aol.com
Subform Count: 5
CHILDREN Count
1stkidsname 5
2ndKidsname 5
3rdkidsname 5
4thKidsname 5
5thkidsname 5
------------------------------------------------------------------------
603-487-5776
John Doe
3 Stage Rd
Northwood NH
Email:
Subform Count: 5
CHILDREN Count
5
------------------------------------------------------------------------
603-228-5786
Paul Charpentier
Nancy Charpentier
834 Duncan St
Concord NH 03303
Email: charpentiersofconcordnh@hotmail.com
Subform Count: 5
CHILDREN Count
James 5
Rachel 5
Stephanie 5
------------------------------------------------------------------------
603-736-2445
Jane Parker
83 Orchard Ln
Epsom NH 03234
Email: jparkergardener@earthlink.com
Subform Count: 5
CHILDREN Count
5
------------------------------------------------------------------------
603-788-6574
Bruce Yeaton
Gertrude Davis-Yeaton
63 Pendelton Ln
Loudon NH 03307
Email: bruceyeatonyakeefan@direcway.com
Subform Count: 5
CHILDREN Count
Bonnie 5
So, basically I have two questions:
1) Should Visibility() work on a subreport element? (It seems to work on other types of elements in a report.)
2) Why does @FormResultSetTotal() keep giving the count of only the first parent record's subreport total?
I hope I have explained myself clearly. If not, I'm sure you'll let me know.

Thanks.