lbass,
This worked!!! I can't believe it!! I have worked on this for over 3 weeks, and couldn't get it to work 100% of the time, but this solutions does. Thank you so much!
I have to say though, I am so confused as to why this solution worked and mine did not.
What I had b4 was this:
1. An {@RowCount} formula in Detail Sections a and b:
whileprintingrecords;
numbervar rowcount;
if {@IsSuppressed} = True
then RowCount := RowCount + 0
else RowCount := RowCount + 1
2. An {@resetRowCount} formula in the Page Header:
whileprintingrecords;
numbervar rowcount := 0;
3. An {@IsSuppressed} formula in Detail Section a:
whileprintingrecords;
BooleanVar IsSuppressed;
if {#RecordCount} <> 1 and {#RecordCount} <= Count
({detailfield, group#1}) and {@RowCount} <> 1 and
{@RowCount} <> 40 then IsSuppressed:=True
else IsSuppressed:=False
4. An {#RecordCount} in Detail Section b and a count summary field in GF 1 called.
5. Group Header and Group Footer sections were suppressed and I moved the Group Header Name to Detail Section a and the detail records to Detail Section b.
6. The following conditional suppression on the Group Header Name in Section a:
{#RecordCount} <> 1 and {#RecordCount} <= Count
({detailfield, group#1}) and {@RowCount} <> 1 and
{@RowCount} <> 40
This is the solution I had, and it never would get the RowCount right everytime. Plus, I only had one instance of the GroupHeader and it was in Detail Section a, not b. Any ideas as to why this solution wasn't working for me?
Also, do you know if your solution will work with an additional statement in the coniditional suppress to only print at the top of column 2 if there are remaining records in the group to print? I noticed on one page that it repeated the group name at the top of column two, as it should, but there were no more records to print for that group, so it immediately printed the next GroupHeader name, as it should. So, I have an instance in the report where on one page it shows two Group names listed at the top of column 2? I was thinking that if I added my #RecordCount and Summary back into the report and modified my conditional suppress formula to match the following (I have 39 records in my first column) that it might fix this:
remainder({@cnt},2*37-1) <> 38 and and {#RecordCount} <= Count ({detailfield, group#1})
Your thoughts?
Thanks,
KB