sort report based on calculated field

G

Guest

I have a query that is pulling in "AgentCd"=Agent, "Sales" = Sales and
"Downpay" = Sales with Downpayment. Each Agent has numberous sales that I'm
counting. I have a summary report that shows each agent code, their total
sales, then their sales with downpayment. I'm then calculating the percent
of sales with downpayment and that percent is in the field titled "%withDP".
The report is working great by I can't seem to get the data to sort decending
based on my calculated field of "%withDP". Can this be done with code?
Thanks for your help.
 
S

strive4peace

The only way to sort is if you can get the calculation into the
RecordSource instead of in a report control


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*
 
G

Guest

To add to Crystal's comment a little bit...

Reports do not use any sort orders applied to a query that serves as the
record source. Instead, you must use the option View > Sorting and Grouping,
which you can see in report design view. So, you will do your calculation in
the query with some field alias. Then, use this new field alias under the
Sorting and Grouping option in report design.


Tom Wickerath
Microsoft Access MVP
https://mvp.support.microsoft.com/profile/Tom
http://www.access.qbuilt.com/html/expert_contributors.html
__________________________________________

:

The only way to sort is if you can get the calculation into the
RecordSource instead of in a report control


Warm Regards,
Crystal
*
:) have an awesome day :)
*
MVP Access
Remote Programming and Training
strive4peace2006 at yahoo.com
*

__________________________________________
JOUIOUI wrote:

I have a query that is pulling in "AgentCd"=Agent, "Sales" = Sales and
"Downpay" = Sales with Downpayment. Each Agent has numberous sales that I'm
counting. I have a summary report that shows each agent code, their total
sales, then their sales with downpayment. I'm then calculating the percent
of sales with downpayment and that percent is in the field titled "%withDP".
The report is working great by I can't seem to get the data to sort decending
based on my calculated field of "%withDP". Can this be done with code?
Thanks for your help.
 

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