Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Sorting on a Subtotal Calculated field 2

Status
Not open for further replies.

jcline

Technical User
Aug 11, 2005
2
US
I have created a summary report that shows the 140 districts along with margin deterioration as a subtotal field. The subtotal is derived using the sum([Margin])under the [District] footer. The detail section fields are not visible, so all that the report shows is the summary fields in the [District] footer.

Is there a way to sort descending by sum([Margin]) in the [District] footer, so that the worst offices are at the top of the report?

I appreciate any help you can bring to the table.
 
I would create a Totals Query, grouping on [District] and summing on [Margin], and set [Margin] to sort Descending.

Create a new report with this query as its Recordsource and you should be all set.

Si hoc legere scis, nimis eruditionis habes
 
If you need to display both detailed and summary information and want to sort on the summary information, create the totals query suggested by CosmoKramer and add it to the record source of your report. Join the District fields.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I appreciate both resposnses - great idea using a Totals Query, and it did what I needed!

Thanks!

Joe
 
I have Access 2003. I am trying to export an Access report over to Excel. I have groupings with sub totals within the report. The problem I am having is that when the file is exported over to Excel, the sub total column shifts over one column. Does anyone know how I could get the amount columns with the sub totals to stay within there own column. I am putting the subtotals in the page footers.

I’m assuming the only way to get subtotals is to put the information in the footer section.

I eventually want to automate the process using VBA with the OUTPUTTO command. Also I want to use a Excel template so the columns will be formatted does anyone know who to fix this problem.
 
Pelase start a new thread with an appropriate subject line.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Scroll down on this page to create a new thread. Please provide a descriptive subject.
Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top