Sort Report

N

Nylex

I have a Main Form which has the clients Name and Address and A subform which
has the Product and the price we are quoting them
I then have a report which I print out for handing to the client - but I can
not get it to sort by the description when it prints out
What do I alter to make it sort , the Main form - the subform or the report
The main form and the subform are linked and the report only prints out the
current quote that is loaded
 
P

pietlinden

I have a Main Form which has the clients Name and Address and A subform which
has the Product and the price we are quoting them
I then have a report which I print out for handing to the client - but I can
not get it to sort by the description when it prints out
What do I alter to make it sort , the Main form - the subform or the report
The main form and the subform are linked and the report only prints out the
current quote that is loaded

forms and reports are distinct entities. The sorting in one has
absolutely nothing to do with the sorting in the other. If you want
to modify the sorting of the report, then set the Order By property of
the report and set Order By On to True.
 
F

fredg

I have a Main Form which has the clients Name and Address and A subform which
has the Product and the price we are quoting them
I then have a report which I print out for handing to the client - but I can
not get it to sort by the description when it prints out
What do I alter to make it sort , the Main form - the subform or the report
The main form and the subform are linked and the report only prints out the
current quote that is loaded

The place to sort a report is in the Report's Sorting and Grouping
dialog.
in Report Design View, click on
View + Sorting and grouping.
Enter the name of the field, or an expression, in the upper left
column. Set it to Ascending or Descending in the right column.

I hope that the actual client's name field is not [Name].
Name is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html
 
N

Nylex

At the moment the field is set to OrderID
When I set it to ProductID only one item prints out


fredg said:
I have a Main Form which has the clients Name and Address and A subform which
has the Product and the price we are quoting them
I then have a report which I print out for handing to the client - but I can
not get it to sort by the description when it prints out
What do I alter to make it sort , the Main form - the subform or the report
The main form and the subform are linked and the report only prints out the
current quote that is loaded

The place to sort a report is in the Report's Sorting and Grouping
dialog.
in Report Design View, click on
View + Sorting and grouping.
Enter the name of the field, or an expression, in the upper left
column. Set it to Ascending or Descending in the right column.

I hope that the actual client's name field is not [Name].
Name is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html
 
F

fredg

At the moment the field is set to OrderID
When I set it to ProductID only one item prints out

fredg said:
I have a Main Form which has the clients Name and Address and A subform which
has the Product and the price we are quoting them
I then have a report which I print out for handing to the client - but I can
not get it to sort by the description when it prints out
What do I alter to make it sort , the Main form - the subform or the report
The main form and the subform are linked and the report only prints out the
current quote that is loaded

The place to sort a report is in the Report's Sorting and Grouping
dialog.
in Report Design View, click on
View + Sorting and grouping.
Enter the name of the field, or an expression, in the upper left
column. Set it to Ascending or Descending in the right column.

I hope that the actual client's name field is not [Name].
Name is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html

This post doesn't make any sense to me.
Your original post says you have a report and you wish to sort it
according to description (i.e. "to sort by the description when it
prints out ").
Here you'r telling us that you are sorting according to ProductID
(which doesn't sound like a description field to me) and haven't given
any further information. Sorting in a report has no effect on the data
returned in the report, other than in how the data is sorted and/or
grouped.

If by sorting the report you really mean to "filter the report",
you'll have to use a different method and give us more useful
information. You stated originally that the report did return just the
record shown on the form. Sorting and Grouping will not affect that.
 
N

Nylex

Sorry - not enough info
I have a form and subform
On the Main Form I have the clients Details and notes about the Order or
Quote - in a table called orders
The subform has the Items and qty and price we are quoting in a table called
Order Details
Both tables have a field OrderID linking them
When all the details for a specific quote is entered I then have a Report
that prints out - this has our logo and Address and all the other info that
goes on the quote
The Detail section of the report is where all the details are printed
Product Desc Part No Qty Price
I want the detail section to be sorted by the Product Desc so that they are
listed alphabetically
Hope this is enough info

fredg said:
At the moment the field is set to OrderID
When I set it to ProductID only one item prints out

fredg said:
On Tue, 1 Jul 2008 19:59:00 -0700, Nylex wrote:

I have a Main Form which has the clients Name and Address and A subform which
has the Product and the price we are quoting them
I then have a report which I print out for handing to the client - but I can
not get it to sort by the description when it prints out
What do I alter to make it sort , the Main form - the subform or the report
The main form and the subform are linked and the report only prints out the
current quote that is loaded

The place to sort a report is in the Report's Sorting and Grouping
dialog.
in Report Design View, click on
View + Sorting and grouping.
Enter the name of the field, or an expression, in the upper left
column. Set it to Ascending or Descending in the right column.

I hope that the actual client's name field is not [Name].
Name is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html

This post doesn't make any sense to me.
Your original post says you have a report and you wish to sort it
according to description (i.e. "to sort by the description when it
prints out ").
Here you'r telling us that you are sorting according to ProductID
(which doesn't sound like a description field to me) and haven't given
any further information. Sorting in a report has no effect on the data
returned in the report, other than in how the data is sorted and/or
grouped.

If by sorting the report you really mean to "filter the report",
you'll have to use a different method and give us more useful
information. You stated originally that the report did return just the
record shown on the form. Sorting and Grouping will not affect that.
 
L

Larry Linson

In the upper-leftmost little square box in the Report in Design View,
right-click and choose "Sorting and Grouping". If you are printing
information about more than a single Customer's orders, you may need higher
level Sorting and Grouping, but what you describe is the detail data level,
or lowest level of Sorting, and if the report is only for one Customer, will
be enough. Choose the field name which you print with the Caption "Product
Desc" (which Field Name may also _be_ Product Desc... if you have a space in
that name, enclose it in square brackets, e.g., [Product Desc]), and choose
the sort order as Ascending or Descending.

Larry Linson
Microsoft Office Access MVP


Nylex said:
Sorry - not enough info
I have a form and subform
On the Main Form I have the clients Details and notes about the Order or
Quote - in a table called orders
The subform has the Items and qty and price we are quoting in a table
called
Order Details
Both tables have a field OrderID linking them
When all the details for a specific quote is entered I then have a Report
that prints out - this has our logo and Address and all the other info
that
goes on the quote
The Detail section of the report is where all the details are printed
Product Desc Part No Qty Price
I want the detail section to be sorted by the Product Desc so that they
are
listed alphabetically
Hope this is enough info

fredg said:
At the moment the field is set to OrderID
When I set it to ProductID only one item prints out

:

On Tue, 1 Jul 2008 19:59:00 -0700, Nylex wrote:

I have a Main Form which has the clients Name and Address and A
subform which
has the Product and the price we are quoting them
I then have a report which I print out for handing to the client -
but I can
not get it to sort by the description when it prints out
What do I alter to make it sort , the Main form - the subform or the
report
The main form and the subform are linked and the report only prints
out the
current quote that is loaded

The place to sort a report is in the Report's Sorting and Grouping
dialog.
in Report Design View, click on
View + Sorting and grouping.
Enter the name of the field, or an expression, in the upper left
column. Set it to Ascending or Descending in the right column.

I hope that the actual client's name field is not [Name].
Name is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html

This post doesn't make any sense to me.
Your original post says you have a report and you wish to sort it
according to description (i.e. "to sort by the description when it
prints out ").
Here you'r telling us that you are sorting according to ProductID
(which doesn't sound like a description field to me) and haven't given
any further information. Sorting in a report has no effect on the data
returned in the report, other than in how the data is sorted and/or
grouped.

If by sorting the report you really mean to "filter the report",
you'll have to use a different method and give us more useful
information. You stated originally that the report did return just the
record shown on the form. Sorting and Grouping will not affect that.
 
N

Nylex

When I open the "Sorting and Grouping" it has in it on the 1st line
"Order.OrderID" Ascending and the Report prints the Heading and all the
details correctly and in the Details section prints the 11 entries that have
been made against this quote
When I change the 1st line in the box to be "ProductID" Ascending then the
heading prints out but in the details section only 1 item prints and it isnt
even the one that starts with "B" which it should be if it is sorting properly
Should I leave the first line and put the next entry on the second line??


Larry Linson said:
In the upper-leftmost little square box in the Report in Design View,
right-click and choose "Sorting and Grouping". If you are printing
information about more than a single Customer's orders, you may need higher
level Sorting and Grouping, but what you describe is the detail data level,
or lowest level of Sorting, and if the report is only for one Customer, will
be enough. Choose the field name which you print with the Caption "Product
Desc" (which Field Name may also _be_ Product Desc... if you have a space in
that name, enclose it in square brackets, e.g., [Product Desc]), and choose
the sort order as Ascending or Descending.

Larry Linson
Microsoft Office Access MVP


Nylex said:
Sorry - not enough info
I have a form and subform
On the Main Form I have the clients Details and notes about the Order or
Quote - in a table called orders
The subform has the Items and qty and price we are quoting in a table
called
Order Details
Both tables have a field OrderID linking them
When all the details for a specific quote is entered I then have a Report
that prints out - this has our logo and Address and all the other info
that
goes on the quote
The Detail section of the report is where all the details are printed
Product Desc Part No Qty Price
I want the detail section to be sorted by the Product Desc so that they
are
listed alphabetically
Hope this is enough info

fredg said:
On Wed, 2 Jul 2008 02:27:01 -0700, Nylex wrote:

At the moment the field is set to OrderID
When I set it to ProductID only one item prints out

:

On Tue, 1 Jul 2008 19:59:00 -0700, Nylex wrote:

I have a Main Form which has the clients Name and Address and A
subform which
has the Product and the price we are quoting them
I then have a report which I print out for handing to the client -
but I can
not get it to sort by the description when it prints out
What do I alter to make it sort , the Main form - the subform or the
report
The main form and the subform are linked and the report only prints
out the
current quote that is loaded

The place to sort a report is in the Report's Sorting and Grouping
dialog.
in Report Design View, click on
View + Sorting and grouping.
Enter the name of the field, or an expression, in the upper left
column. Set it to Ascending or Descending in the right column.

I hope that the actual client's name field is not [Name].
Name is a reserved Access/VBA/Jet word and should not be used as a
field name.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'

For an even more complete list of reserved words, see:
http://www.allenbrowne.com/AppIssueBadWord.html
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail


This post doesn't make any sense to me.
Your original post says you have a report and you wish to sort it
according to description (i.e. "to sort by the description when it
prints out ").
Here you'r telling us that you are sorting according to ProductID
(which doesn't sound like a description field to me) and haven't given
any further information. Sorting in a report has no effect on the data
returned in the report, other than in how the data is sorted and/or
grouped.

If by sorting the report you really mean to "filter the report",
you'll have to use a different method and give us more useful
information. You stated originally that the report did return just the
record shown on the form. Sorting and Grouping will not affect that.
 
L

Larry Linson

Nylex said:
When I open the "Sorting and Grouping" it has in it on the 1st line
"Order.OrderID" Ascending and the Report prints the Heading and all the
details correctly and in the Details section prints the 11 entries that
have
been made against this quote
When I change the 1st line in the box to be "ProductID" Ascending then the
heading prints out but in the details section only 1 item prints and it
isnt
even the one that starts with "B" which it should be if it is sorting
properly
Should I leave the first line and put the next entry on the second line??

There seems to be some discrepancy, or I am misunderstanding... in my Tables
a field named "ProductID" would be a numeric field used as a key, and
"Product Desc" would be a text description. If you want the data sorted
alphabetically by "Product Desc" then you have to use whatever Field is the
one displayed under that heading.

If you are printing more than one Order in this Report, you would definitely
need to leave in the first line, and add the Sort by Product Description.

From your description, you made a change that grouped on each Product ID
(each line intended to be a detail line).

Larry Linson
Microsoft Office Access MVP
 
N

Nylex

The "ProductID" field is linked to the products table which has an ProductID
which is the Key and then it has "Description" field and then "BarCode" field
Changing the sort to Ascending or Descinding alter the printout - on
checking each item I find that the ProductID field has a number in it and the
Report has it as a Combo Box - when the report prints it prints the Desc not
the number and then on the same line it prints the barcode no - to get it to
do this I have in the Report form the following
=DLookUp("BarCode","Products","ProductID= " & [ProductID])
Do I have to do the same sort of lookup and get the desc so that I can sort
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top