Grouping Problem in report

  • Thread starter Thread starter sword856
  • Start date Start date
S

sword856

Hello all.
I am trying to construct a report that sorts records based on
departments in the organization. Each department code is a letter and
a number, like B1. However, each department is divided into
divisions, whose codes are the Departments plus another number, like
B12. Each division has subdivisions with codes like B123. All these
are entered into one field, "CodeID", for each employee. I want to be
able to group the records on my report by Department, i.e., the first
2 characters in each code. I tried using the grouping and sorting
option, setting CodeID to "Prefix Characters" and selecting "2" for
the GroupInterval, and it only half worked. It does the grouping
right, but instead of showing B1 as the heading for that group, it
shows B123. I don't know why it is doing this. Thanks for any help
on this.

-George
 
Grouping and sorting controls are only for that function, not for data
display in report output.
Your best method is the use a calculated field in the query used as source
for the report. Department: Left([CodeID],2)
 
Grouping and sorting controls are only for that function, not for data
display in report output.
Your best method is the use a calculated field in the query used as source
for the report. Department: Left([CodeID],2)

--
KARL DEWEY
Build a little - Test a little



Hello all.
I am trying to construct a report that sorts records based on
departments in the organization. Each department code is a letter and
a number, like B1. However, each department is divided into
divisions, whose codes are the Departments plus another number, like
B12. Each division has subdivisions with codes like B123. All these
are entered into one field, "CodeID", for each employee. I want to be
able to group the records on my report by Department, i.e., the first
2 characters in each code. I tried using the grouping and sorting
option, setting CodeID to "Prefix Characters" and selecting "2" for
the GroupInterval, and it only half worked. It does the grouping
right, but instead of showing B1 as the heading for that group, it
shows B123. I don't know why it is doing this. Thanks for any help
on this.
-George- Hide quoted text -

- Show quoted text -

Thanks, Karl! That's exactly what I needed. I didn't know that
function even existed. Thanks again for pointing me to it.
-George
 
Back
Top