We help IT Professionals succeed at work.
Get Started

Problem with setting report sort order at run time

Juan Velasquez
on
294 Views
Last Modified: 2012-06-27
Hello,
Below is the sql statement that is used at runtime.  I've placed this code in a query and it sorts as it is supposed to - in this case by Task Order.  Yet when I run the report, it is not being sorted by task order.  I then went ahead and created a query using the sql statement below and made it the recordsource of the report at design time.  I still had the same problem.  I've check for any groupings or sort orders that were set in the report at design time but couldn't find any.  This is an access 2007 database
SELECT qryProject.[TaskOrder], [OBS Master].OBS, [Lname] & ', '  & [Fname] AS Name, [OBS Master].Fname, [OBS Master].Lname, qryProject.[ChargeNumber], qryProject.Posted AS WeekEnding, qryProject.Workhours AS RegularHours, [FY11B]+[FY11OH] AS FY11Rate, [RegularHours]*[FY11Rate] AS RegularPay, qryProject.Overtime AS OvertimeHours, [OT11B]+[OT11OH] AS FY11otRate, [OvertimeHours]*[FY11otRate] AS OvertimePay, [OBS Master].ODC3 AS FY11odcRate, [OBS Master].Fee2 AS FY11FeeRate,[RegularPay]+[OvertimePay] AS TotalPay, [OBS Master].FY11B, [OBS Master].FY11OH, [OBS Master].OT11B, [OBS Master].OT11OH, project.Comments, project.locked, qryProject.source, [OBS Master].[Company ] FROM (Period INNER JOIN qryProject ON Period.[Week Ending] = qryProject.Posted) INNER JOIN [OBS Master] ON qryProject.OBS = [OBS Master].OBS WHERE qryProject.locked = False AND qryProject.source Like 'a' AND [Week Ending] = #4/22/2011# AND Company = 'EC' ORDER BY TaskOrder

Open in new window

Comment
Watch Question
Database Architect / Application Developer
CERTIFIED EXPERT
Top Expert 2007
Commented:
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE