Query descending but Report ascending

Pusher

BEOGRAD Put
Local time
Today, 23:25
Joined
May 25, 2011
Messages
230
Hi all,
I made a Query that has this code, and when i run it i have the right order, descending…
Code:
  SELECT TOP 5 IZVESTAJ.ID_UREDJAJ, IZVESTAJ.ID_RASKRSNICE, Count(IZVESTAJ.ID_GRESKE) AS CountOfID_GRESKE
  FROM IZVESTAJ
  WHERE (((IZVESTAJ.DATUM_IZVESTAJA) Between Nz([forms]![FrmPrikazIzvestaja]![txtStart],[forms]![FrmPrikazIzvestaja]![txtAltStart]) And Nz([forms]![FrmPrikazIzvestaja]![txtEnd],[forms]![FrmPrikazIzvestaja]![txtAltEnd])) AND ((IZVESTAJ.NEZAVRSENE_INTERVENCIJE)=Yes))
  GROUP BY IZVESTAJ.ID_UREDJAJ, IZVESTAJ.ID_RASKRSNICE
  HAVING (((IZVESTAJ.ID_UREDJAJ)=[Forms]![FrmPrikazIzvestaja]![Combo58]) AND ((Count(IZVESTAJ.ID_GRESKE)) Is Not Null))
  ORDER BY Count(IZVESTAJ.ID_GRESKE) DESC;
But when i put it in a report i get the reverse order of Count ID_GRESKE ascending. How do i fix this?
 
You need to set the Order in the Report.

You will find it under Sorting and Grouping.

The Report overrides the query sort order.
 

Users who are viewing this thread

Back
Top Bottom