Hello,
I have a report with the Priority field is used as sort order and
grouping. The problem is the data in this Priority field if sorted in
ascending order is: High, Low, and Medium. How could I sort it as:
Low, Medium, High?
Any suggestion is greatly appreciated,
James 11 3850
James, Don't know how you can, but what you could do is base the report on a
query. In the query add the fields you want for your report then add the
below statement to the top row (Field:) of an empty column in you query grid
txtSort:
IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3)))
Now you can sort by this field either in the query or via the sorting and
grouping in the report.
Hope this helps!
Reggie
----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om... Hello,
I have a report with the Priority field is used as sort order and grouping. The problem is the data in this Priority field if sorted in ascending order is: High, Low, and Medium. How could I sort it as: Low, Medium, High?
Any suggestion is greatly appreciated, James
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om Hello,
I have a report with the Priority field is used as sort order and grouping. The problem is the data in this Priority field if sorted in ascending order is: High, Low, and Medium. How could I sort it as: Low, Medium, High?
Any suggestion is greatly appreciated, James
You are sorting by a text field. Best to use a numeric code to represent
the levels with a lookup table to get the text, makes sorting much
easier.
eg.
1 High
2 Medium
3 Low
--
regards,
Bradley
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<i6********************@comcast.com>... James, Don't know how you can, but what you could do is base the report on a query. In the query add the fields you want for your report then add the below statement to the top row (Field:) of an empty column in you query grid txtSort: IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3)))
Now you can sort by this field either in the query or via the sorting and grouping in the report.
Hope this helps!
Reggie
---------- "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om... Hello,
I have a report with the Priority field is used as sort order and grouping. The problem is the data in this Priority field if sorted in ascending order is: High, Low, and Medium. How could I sort it as: Low, Medium, High?
Any suggestion is greatly appreciated, James
Thank you, Reggie.
"Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>... "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om Hello,
I have a report with the Priority field is used as sort order and grouping. The problem is the data in this Priority field if sorted in ascending order is: High, Low, and Medium. How could I sort it as: Low, Medium, High?
Any suggestion is greatly appreciated, James
You are sorting by a text field. Best to use a numeric code to represent the levels with a lookup table to get the text, makes sorting much easier.
eg. 1 High 2 Medium 3 Low
I followed Reggie's suggestion (and also from Bradley, thank you).
One thing I did not mentioned before was I have another Name sort and
grouping over Priority. Which means Name is the main sort and
grouping, then Priority (I named it PriorityNum). For debugging
purpose, I put PriorityNum (numeric) in both detail line and also in
the grouping header.
Whenever I ran the report, it prompted as: "Enter parameter value:" in
the box title, and it asked for PriorityNum. I entered nothing. The
result I got was the Priority numeric printed correctly at the detail
line, but the grouping header (I put as = [PriorityNum]), it did not
break correctly. For example, it shows PriorityNum as 2 at the header
grouping, but in that detail group, it shows all 2, 1 and 3 mixed up.
Any other suggestions? Thank you in advance.
James
James, I believe that is because you are using a reserved word for your
field "Name". Change this to txtName or something else and see if this
doesn't fix your problem. If not post back!
--
Reggie
----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om... "Bradley.-." <sp********@mail.com> wrote in message
news:<A3*******************@news-server.bigpond.net.au>... "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om Hello,
I have a report with the Priority field is used as sort order and grouping. The problem is the data in this Priority field if sorted in ascending order is: High, Low, and Medium. How could I sort it as: Low, Medium, High?
Any suggestion is greatly appreciated, James
You are sorting by a text field. Best to use a numeric code to represent the levels with a lookup table to get the text, makes sorting much easier.
eg. 1 High 2 Medium 3 Low
I followed Reggie's suggestion (and also from Bradley, thank you). One thing I did not mentioned before was I have another Name sort and grouping over Priority. Which means Name is the main sort and grouping, then Priority (I named it PriorityNum). For debugging purpose, I put PriorityNum (numeric) in both detail line and also in the grouping header.
Whenever I ran the report, it prompted as: "Enter parameter value:" in the box title, and it asked for PriorityNum. I entered nothing. The result I got was the Priority numeric printed correctly at the detail line, but the grouping header (I put as = [PriorityNum]), it did not break correctly. For example, it shows PriorityNum as 2 at the header grouping, but in that detail group, it shows all 2, 1 and 3 mixed up.
Any other suggestions? Thank you in advance. James
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<Rc********************@comcast.com>... James, I believe that is because you are using a reserved word for your field "Name". Change this to txtName or something else and see if this doesn't fix your problem. If not post back!
-- Reggie
---------- "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om... "Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>... "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om > Hello, > > I have a report with the Priority field is used as sort order and > grouping. The problem is the data in this Priority field if sorted in > ascending order is: High, Low, and Medium. How could I sort it as: > Low, Medium, High? > > Any suggestion is greatly appreciated, > James
You are sorting by a text field. Best to use a numeric code to represent the levels with a lookup table to get the text, makes sorting much easier.
eg. 1 High 2 Medium 3 Low
I followed Reggie's suggestion (and also from Bradley, thank you). One thing I did not mentioned before was I have another Name sort and grouping over Priority. Which means Name is the main sort and grouping, then Priority (I named it PriorityNum). For debugging purpose, I put PriorityNum (numeric) in both detail line and also in the grouping header.
Whenever I ran the report, it prompted as: "Enter parameter value:" in the box title, and it asked for PriorityNum. I entered nothing. The result I got was the Priority numeric printed correctly at the detail line, but the grouping header (I put as = [PriorityNum]), it did not break correctly. For example, it shows PriorityNum as 2 at the header grouping, but in that detail group, it shows all 2, 1 and 3 mixed up.
Any other suggestions? Thank you in advance. James
Reggie,
In my program, I used txtAssignee instead of Name. Sorry, for the
confusion in my email when I tried to make it simple by using Name
instead of the real field name. So, here is my layout is supposed to
look like:
1) First sort and grouping: txtAssignee : in header group 1.
2) Second sort and grouping: txtPriority = [PriorityNum]. This part
is in the header group 2.
PriorityNum = Your IIF statement that you gave me.
James
James, Open your sorting & grouping box. Now select the txtAssignee first
from the drop down list then the txtPriority or PriorityNum second. From
your post a I can't tell what the control is because of this statement
"txtPriority = [PriorityNum]". It sounds like you are trying to group by
[PriorityNum] in you sorting & grouping box, but that field doesn't exist in
your recordsource anymore because you renamed it to txtPriority in the
query. Hope this helps, if not post back! 1) First sort and grouping: txtAssignee : in header group 1. 2) Second sort and grouping: txtPriority = [PriorityNum]. This part is in the header group 2. PriorityNum = Your IIF statement that you gave me.
--
Reggie
----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om... "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message
news:<Rc********************@comcast.com>... James, I believe that is because you are using a reserved word for your field "Name". Change this to txtName or something else and see if this doesn't fix your problem. If not post back!
-- Reggie
---------- "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om... "Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>... > "James P." <ha*********@yahoo.com> wrote in message > news:f4**************************@posting.google.c om > > Hello, > > > > I have a report with the Priority field is used as sort order and > > grouping. The problem is the data in this Priority field if
sorted in > > ascending order is: High, Low, and Medium. How could I sort it
as: > > Low, Medium, High? > > > > Any suggestion is greatly appreciated, > > James > > You are sorting by a text field. Best to use a numeric code to
represent > the levels with a lookup table to get the text, makes sorting much > easier. > > eg. > 1 High > 2 Medium > 3 Low
I followed Reggie's suggestion (and also from Bradley, thank you). One thing I did not mentioned before was I have another Name sort and grouping over Priority. Which means Name is the main sort and grouping, then Priority (I named it PriorityNum). For debugging purpose, I put PriorityNum (numeric) in both detail line and also in the grouping header.
Whenever I ran the report, it prompted as: "Enter parameter value:" in the box title, and it asked for PriorityNum. I entered nothing. The result I got was the Priority numeric printed correctly at the detail line, but the grouping header (I put as = [PriorityNum]), it did not break correctly. For example, it shows PriorityNum as 2 at the header grouping, but in that detail group, it shows all 2, 1 and 3 mixed up.
Any other suggestions? Thank you in advance. James
Reggie,
In my program, I used txtAssignee instead of Name. Sorry, for the confusion in my email when I tried to make it simple by using Name instead of the real field name. So, here is my layout is supposed to look like:
1) First sort and grouping: txtAssignee : in header group 1. 2) Second sort and grouping: txtPriority = [PriorityNum]. This part is in the header group 2. PriorityNum = Your IIF statement that you gave me.
James
"Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<OL********************@comcast.com>... James, Open your sorting & grouping box. Now select the txtAssignee first from the drop down list then the txtPriority or PriorityNum second. From your post a I can't tell what the control is because of this statement "txtPriority = [PriorityNum]". It sounds like you are trying to group by [PriorityNum] in you sorting & grouping box, but that field doesn't exist in your recordsource anymore because you renamed it to txtPriority in the query. Hope this helps, if not post back!
1) First sort and grouping: txtAssignee : in header group 1. 2) Second sort and grouping: txtPriority = [PriorityNum]. This part is in the header group 2. PriorityNum = Your IIF statement that you gave me.
-- Reggie
---------- "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om... "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<Rc********************@comcast.com>... James, I believe that is because you are using a reserved word for your field "Name". Change this to txtName or something else and see if this doesn't fix your problem. If not post back!
-- Reggie
---------- "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om... > "Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>... > > "James P." <ha*********@yahoo.com> wrote in message > > news:f4**************************@posting.google.c om > > > Hello, > > > > > > I have a report with the Priority field is used as sort order and > > > grouping. The problem is the data in this Priority field if sorted in > > > ascending order is: High, Low, and Medium. How could I sort it as: > > > Low, Medium, High? > > > > > > Any suggestion is greatly appreciated, > > > James > > > > You are sorting by a text field. Best to use a numeric code to represent > > the levels with a lookup table to get the text, makes sorting much > > easier. > > > > eg. > > 1 High > > 2 Medium > > 3 Low > > I followed Reggie's suggestion (and also from Bradley, thank you). > One thing I did not mentioned before was I have another Name sort and > grouping over Priority. Which means Name is the main sort and > grouping, then Priority (I named it PriorityNum). For debugging > purpose, I put PriorityNum (numeric) in both detail line and also in > the grouping header. > > Whenever I ran the report, it prompted as: "Enter parameter value:" in > the box title, and it asked for PriorityNum. I entered nothing. The > result I got was the Priority numeric printed correctly at the detail > line, but the grouping header (I put as = [PriorityNum]), it did not > break correctly. For example, it shows PriorityNum as 2 at the header > grouping, but in that detail group, it shows all 2, 1 and 3 mixed up. > > Any other suggestions? Thank you in advance. > James
Reggie,
In my program, I used txtAssignee instead of Name. Sorry, for the confusion in my email when I tried to make it simple by using Name instead of the real field name. So, here is my layout is supposed to look like:
1) First sort and grouping: txtAssignee : in header group 1. 2) Second sort and grouping: txtPriority = [PriorityNum]. This part is in the header group 2. PriorityNum = Your IIF statement that you gave me.
James
Reggie,
I used txtPriority as group header 2. It refers to PriorityNum in the
detail line. PriorityNum is defined with your IIF statement. Neither
PriorityNum nor TxtPriority shown in the dropdown list of Sorting &
Grouping. I guess because these two fields I defined it myself and
they are not part of the SQL table I used for the report.
Plus, it keeps asking me to enter value for txtPriority. I just
clicked Ok without entering any value and I still have the same
problem of mixed up priority number in my detail line.
James
James, Lets try this! It sounds like you are typing txtPriority =
[PriorityNum] on the second line of the sort/group box and these are both
unbound controls on your report. Instead of that Open your report and open
the sorting/grouping box. Remove what you have on the second line and type
in exactly what Is below (which is probably what you have the control source
of your unbound [PriorityNum] set to).
=IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3)))
This should do what you want. If you set this second sort/group to Group
Header=Yes you will see the statement above as the title for the header.
--
Reggie
----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om... "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message
news:<OL********************@comcast.com>... James, Open your sorting & grouping box. Now select the txtAssignee
first from the drop down list then the txtPriority or PriorityNum second.
From your post a I can't tell what the control is because of this statement "txtPriority = [PriorityNum]". It sounds like you are trying to group
by [PriorityNum] in you sorting & grouping box, but that field doesn't
exist in your recordsource anymore because you renamed it to txtPriority in the query. Hope this helps, if not post back!
1) First sort and grouping: txtAssignee : in header group 1. 2) Second sort and grouping: txtPriority = [PriorityNum]. This part is in the header group 2. PriorityNum = Your IIF statement that you gave me.
-- Reggie
---------- "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om... "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<Rc********************@comcast.com>... > James, I believe that is because you are using a reserved word for
your > field "Name". Change this to txtName or something else and see if
this > doesn't fix your problem. If not post back! > > -- > Reggie > > ---------- > "James P." <ha*********@yahoo.com> wrote in message > news:f4**************************@posting.google.c om... > > "Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>... > > > "James P." <ha*********@yahoo.com> wrote in message > > > news:f4**************************@posting.google.c om > > > > Hello, > > > > > > > > I have a report with the Priority field is used as sort order
and > > > > grouping. The problem is the data in this Priority field if sorted in > > > > ascending order is: High, Low, and Medium. How could I sort
it as: > > > > Low, Medium, High? > > > > > > > > Any suggestion is greatly appreciated, > > > > James > > > > > > You are sorting by a text field. Best to use a numeric code to represent > > > the levels with a lookup table to get the text, makes sorting
much > > > easier. > > > > > > eg. > > > 1 High > > > 2 Medium > > > 3 Low > > > > I followed Reggie's suggestion (and also from Bradley, thank you). > > One thing I did not mentioned before was I have another Name sort
and > > grouping over Priority. Which means Name is the main sort and > > grouping, then Priority (I named it PriorityNum). For debugging > > purpose, I put PriorityNum (numeric) in both detail line and also
in > > the grouping header. > > > > Whenever I ran the report, it prompted as: "Enter parameter
value:" in > > the box title, and it asked for PriorityNum. I entered nothing.
The > > result I got was the Priority numeric printed correctly at the
detail > > line, but the grouping header (I put as = [PriorityNum]), it did
not > > break correctly. For example, it shows PriorityNum as 2 at the
header > > grouping, but in that detail group, it shows all 2, 1 and 3 mixed
up. > > > > Any other suggestions? Thank you in advance. > > James
Reggie,
In my program, I used txtAssignee instead of Name. Sorry, for the confusion in my email when I tried to make it simple by using Name instead of the real field name. So, here is my layout is supposed to look like:
1) First sort and grouping: txtAssignee : in header group 1. 2) Second sort and grouping: txtPriority = [PriorityNum]. This part is in the header group 2. PriorityNum = Your IIF statement that you gave me.
James
Reggie,
I used txtPriority as group header 2. It refers to PriorityNum in the detail line. PriorityNum is defined with your IIF statement. Neither PriorityNum nor TxtPriority shown in the dropdown list of Sorting & Grouping. I guess because these two fields I defined it myself and they are not part of the SQL table I used for the report.
Plus, it keeps asking me to enter value for txtPriority. I just clicked Ok without entering any value and I still have the same problem of mixed up priority number in my detail line. James
"Reggie" <NoSpam_chief123101@NoSpam_yahoo.com> wrote in message news:<cp********************@comcast.com>... James, Lets try this! It sounds like you are typing txtPriority = [PriorityNum] on the second line of the sort/group box and these are both unbound controls on your report. Instead of that Open your report and open the sorting/grouping box. Remove what you have on the second line and type in exactly what Is below (which is probably what you have the control source of your unbound [PriorityNum] set to).
=IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3)))
This should do what you want. If you set this second sort/group to Group Header=Yes you will see the statement above as the title for the header.
-- Reggie
---------- "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om... "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<OL********************@comcast.com>... James, Open your sorting & grouping box. Now select the txtAssignee first from the drop down list then the txtPriority or PriorityNum second. From your post a I can't tell what the control is because of this statement "txtPriority = [PriorityNum]". It sounds like you are trying to group by [PriorityNum] in you sorting & grouping box, but that field doesn't exist in your recordsource anymore because you renamed it to txtPriority in the query. Hope this helps, if not post back!
> 1) First sort and grouping: txtAssignee : in header group 1. > 2) Second sort and grouping: txtPriority = [PriorityNum]. This part > is in the header group 2. > PriorityNum = Your IIF statement that you gave me.
-- Reggie
---------- "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om... > "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<Rc********************@comcast.com>... > > James, I believe that is because you are using a reserved word for your > > field "Name". Change this to txtName or something else and see if this > > doesn't fix your problem. If not post back! > > > > -- > > Reggie > > > > ---------- > > "James P." <ha*********@yahoo.com> wrote in message > > news:f4**************************@posting.google.c om... > > > "Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>... > > > > "James P." <ha*********@yahoo.com> wrote in message > > > > news:f4**************************@posting.google.c om > > > > > Hello, > > > > > > > > > > I have a report with the Priority field is used as sort order and > > > > > grouping. The problem is the data in this Priority field if sorted in > > > > > ascending order is: High, Low, and Medium. How could I sort it as: > > > > > Low, Medium, High? > > > > > > > > > > Any suggestion is greatly appreciated, > > > > > James > > > > > > > > You are sorting by a text field. Best to use a numeric code to represent > > > > the levels with a lookup table to get the text, makes sorting much > > > > easier. > > > > > > > > eg. > > > > 1 High > > > > 2 Medium > > > > 3 Low > > > > > > I followed Reggie's suggestion (and also from Bradley, thank you). > > > One thing I did not mentioned before was I have another Name sort and > > > grouping over Priority. Which means Name is the main sort and > > > grouping, then Priority (I named it PriorityNum). For debugging > > > purpose, I put PriorityNum (numeric) in both detail line and also in > > > the grouping header. > > > > > > Whenever I ran the report, it prompted as: "Enter parameter value:" in > > > the box title, and it asked for PriorityNum. I entered nothing. The > > > result I got was the Priority numeric printed correctly at the detail > > > line, but the grouping header (I put as = [PriorityNum]), it did not > > > break correctly. For example, it shows PriorityNum as 2 at the header > > > grouping, but in that detail group, it shows all 2, 1 and 3 mixed up. > > > > > > Any other suggestions? Thank you in advance. > > > James > > Reggie, > > In my program, I used txtAssignee instead of Name. Sorry, for the > confusion in my email when I tried to make it simple by using Name > instead of the real field name. So, here is my layout is supposed to > look like: > > 1) First sort and grouping: txtAssignee : in header group 1. > 2) Second sort and grouping: txtPriority = [PriorityNum]. This part > is in the header group 2. > PriorityNum = Your IIF statement that you gave me. > > James
Reggie,
I used txtPriority as group header 2. It refers to PriorityNum in the detail line. PriorityNum is defined with your IIF statement. Neither PriorityNum nor TxtPriority shown in the dropdown list of Sorting & Grouping. I guess because these two fields I defined it myself and they are not part of the SQL table I used for the report.
Plus, it keeps asking me to enter value for txtPriority. I just clicked Ok without entering any value and I still have the same problem of mixed up priority number in my detail line. James
Reggie,
Yes, it worked now with your last solution. Thank you so much for
helping me for the last several days. Sorry for the confusion. I
know if I could describe the problem clearly in the first place, you
could have showed me at one shot.
Again, thank you for being patient and helping. Wish you're nearby, I
could have bought you a drink.
James
James, No problem. Glad to help any time! Took us a little while but we
got there! Take care!
--
Reggie
----------
"James P." <ha*********@yahoo.com> wrote in message
news:f4**************************@posting.google.c om... "Reggie" <NoSpam_chief123101@NoSpam_yahoo.com> wrote in message
news:<cp********************@comcast.com>... James, Lets try this! It sounds like you are typing txtPriority = [PriorityNum] on the second line of the sort/group box and these are
both unbound controls on your report. Instead of that Open your report and
open the sorting/grouping box. Remove what you have on the second line and
type in exactly what Is below (which is probably what you have the control
source of your unbound [PriorityNum] set to).
=IIf([Priority]="Low",1,IIf([Priority]="Medium",2,IIf([Priority]="High",3))) This should do what you want. If you set this second sort/group to
Group Header=Yes you will see the statement above as the title for the header.
-- Reggie
---------- "James P." <ha*********@yahoo.com> wrote in message news:f4**************************@posting.google.c om... "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in message news:<OL********************@comcast.com>... > James, Open your sorting & grouping box. Now select the
txtAssignee first > from the drop down list then the txtPriority or PriorityNum second. From > your post a I can't tell what the control is because of this
statement > "txtPriority = [PriorityNum]". It sounds like you are trying to
group by > [PriorityNum] in you sorting & grouping box, but that field doesn't exist in > your recordsource anymore because you renamed it to txtPriority in
the > query. Hope this helps, if not post back! > > > > 1) First sort and grouping: txtAssignee : in header group 1. > > 2) Second sort and grouping: txtPriority = [PriorityNum]. This
part > > is in the header group 2. > > PriorityNum = Your IIF statement that you gave me. > > > -- > Reggie > > ---------- > "James P." <ha*********@yahoo.com> wrote in message > news:f4**************************@posting.google.c om... > > "Reggie" <NoSpam_webmaster@NoSpam_smittysinet.com> wrote in
message news:<Rc********************@comcast.com>... > > > James, I believe that is because you are using a reserved word
for your > > > field "Name". Change this to txtName or something else and see
if this > > > doesn't fix your problem. If not post back! > > > > > > -- > > > Reggie > > > > > > ---------- > > > "James P." <ha*********@yahoo.com> wrote in message > > > news:f4**************************@posting.google.c om... > > > > "Bradley.-." <sp********@mail.com> wrote in message news:<A3*******************@news-server.bigpond.net.au>... > > > > > "James P." <ha*********@yahoo.com> wrote in message > > > > > news:f4**************************@posting.google.c om > > > > > > Hello, > > > > > > > > > > > > I have a report with the Priority field is used as sort
order and > > > > > > grouping. The problem is the data in this Priority field
if sorted in > > > > > > ascending order is: High, Low, and Medium. How could I
sort it as: > > > > > > Low, Medium, High? > > > > > > > > > > > > Any suggestion is greatly appreciated, > > > > > > James > > > > > > > > > > You are sorting by a text field. Best to use a numeric code
to represent > > > > > the levels with a lookup table to get the text, makes
sorting much > > > > > easier. > > > > > > > > > > eg. > > > > > 1 High > > > > > 2 Medium > > > > > 3 Low > > > > > > > > I followed Reggie's suggestion (and also from Bradley, thank
you). > > > > One thing I did not mentioned before was I have another Name
sort and > > > > grouping over Priority. Which means Name is the main sort and > > > > grouping, then Priority (I named it PriorityNum). For
debugging > > > > purpose, I put PriorityNum (numeric) in both detail line and
also in > > > > the grouping header. > > > > > > > > Whenever I ran the report, it prompted as: "Enter parameter value:" in > > > > the box title, and it asked for PriorityNum. I entered
nothing. The > > > > result I got was the Priority numeric printed correctly at the detail > > > > line, but the grouping header (I put as = [PriorityNum]), it
did not > > > > break correctly. For example, it shows PriorityNum as 2 at
the header > > > > grouping, but in that detail group, it shows all 2, 1 and 3
mixed up. > > > > > > > > Any other suggestions? Thank you in advance. > > > > James > > > > Reggie, > > > > In my program, I used txtAssignee instead of Name. Sorry, for the > > confusion in my email when I tried to make it simple by using Name > > instead of the real field name. So, here is my layout is supposed
to > > look like: > > > > 1) First sort and grouping: txtAssignee : in header group 1. > > 2) Second sort and grouping: txtPriority = [PriorityNum]. This
part > > is in the header group 2. > > PriorityNum = Your IIF statement that you gave me. > > > > James
Reggie,
I used txtPriority as group header 2. It refers to PriorityNum in the detail line. PriorityNum is defined with your IIF statement. Neither PriorityNum nor TxtPriority shown in the dropdown list of Sorting & Grouping. I guess because these two fields I defined it myself and they are not part of the SQL table I used for the report.
Plus, it keeps asking me to enter value for txtPriority. I just clicked Ok without entering any value and I still have the same problem of mixed up priority number in my detail line. James
Reggie,
Yes, it worked now with your last solution. Thank you so much for helping me for the last several days. Sorry for the confusion. I know if I could describe the problem clearly in the first place, you could have showed me at one shot.
Again, thank you for being patient and helping. Wish you're nearby, I could have bought you a drink.
James This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Alpay Eno |
last post by:
Hello all... I'm using asp to get records from an access database, very
similar to the way datagrid would work. The title of each column in my table
is a link that alternates the sort order between...
|
by: Matt |
last post by:
Hi all,
We recently upsized two Microsoft Access Databases to SQL. We're
using an ADP (2002) as the front end.
All the conversion issues have been resolved, except for one:
Whenever we...
|
by: Charles |
last post by:
I am trying to add the ability for a user to change the order in which
the elements are listed in a dropdown list box. Before I added the
ListID field the dropdown list box order was controlled...
|
by: Rene |
last post by:
I have another post regarding this "attendance" report of mine...this
one concerns one of my sub-reports. It loses its alphabetical sorting
when inserted in the master report. When run...
|
by: Terri |
last post by:
The following query will give me the top ten states with the most callers.
SELECT TOP 10 Count(Callers.CallerID) AS CountOfCallerID, Callers.State
FROM Callers
GROUP BY Callers.State
ORDER BY...
|
by: yeti349 |
last post by:
Hi, I'm using the following code to retrieve data from an xml file and
populate a javascript array. The data is then displayed in html table
form. I would like to then be able to sort by each...
|
by: Julian |
last post by:
Hi,
I am a very beginner in databases. I created a database table in Access 2003
and OOo 2.03 that includes name, address, postcode, phone numbers etc of our
customers. I would like to sort...
|
by: HowHow |
last post by:
I need to sort the "DateOfBirth" by the day (dd) regarless of month (mm)and year (yyyy). I have a query called q_DC_Client, in criteria, I am using this code below:
Like "*" & "/" & !! & "/" & "*"...
|
by: HowHow |
last post by:
Using Access 2000. I need to group the address by suburb then by street name in my report.
Two major problems here:
1. Unit number has the word "Unit" before number
2. Semi detach house has "a"...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |