Ok, here's the deal,
I'm grouping based on a formula.
I have 3 groups.
Each group is being sorted by a forumla.
In each formula, I have
if {@RecordType} = 'SingleLocation' then
{MyTable.SomeField}
else
{MyTable.AnotherField}.
If the Record type is MultipleLocation, I want it to group by item, then location code, then location.
If the record type is SingleLocation, I want it to group by location code, then location, then item.
So my grouping structire goes:
Group @ReportType
|
Group @FirstGroup
|
Group @SecondGroup
|
Group @ThirdGroup.
In the group footer for @SecondGroup, I enabled "New Page After", conditionally if @ReportType = 'SingleLocation'.
Here's the problem, the results from @SecondGroup AREN'T SORTED, so even though there may be 10 records with a @SecondGroup (LocationCode) Value of 40, I get each on a new page instead only everything with 40 on one page, because the records have the following location codes in order:
10
40
RM
40
10
A0
40
A0
RM
A0
Etc.
Why would it not sort by the results of the function I passed it. Shouldn't it always sort by the group value? Is there a modifier like BeforePrintingRecords or something that I have to give the function before I use it as a group value?
Thanks in advance!
--NipsMG
I'm grouping based on a formula.
I have 3 groups.
Each group is being sorted by a forumla.
In each formula, I have
if {@RecordType} = 'SingleLocation' then
{MyTable.SomeField}
else
{MyTable.AnotherField}.
If the Record type is MultipleLocation, I want it to group by item, then location code, then location.
If the record type is SingleLocation, I want it to group by location code, then location, then item.
So my grouping structire goes:
Group @ReportType
|
Group @FirstGroup
|
Group @SecondGroup
|
Group @ThirdGroup.
In the group footer for @SecondGroup, I enabled "New Page After", conditionally if @ReportType = 'SingleLocation'.
Here's the problem, the results from @SecondGroup AREN'T SORTED, so even though there may be 10 records with a @SecondGroup (LocationCode) Value of 40, I get each on a new page instead only everything with 40 on one page, because the records have the following location codes in order:
10
40
RM
40
10
A0
40
A0
RM
A0
Etc.
Why would it not sort by the results of the function I passed it. Shouldn't it always sort by the group value? Is there a modifier like BeforePrintingRecords or something that I have to give the function before I use it as a group value?
Thanks in advance!
--NipsMG