Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

How to sort details in a group report

edited July 2005 in General
In a report grouped by CustomerName, the details always display ordered by
InvoiceNo. How can I have the details ordered by InvoiceDate?

The query is as follow:
sql.add(' Order by CustomerName, InvoiceDate');

in the ppDBPipeline1 the first field is CustomerName then InvoiceDate.

No matter what I do, the details always sort by InvoiceNo, which I think is
the natural order.

Thanks for any help.

CBenac
cbenac@bellsouth.net

Comments

  • edited July 2005
    Hi CBenac,

    Are you using the data workspace in ReportBuilder to build your queries
    (i.e. DADE) or are you using a TDataSet descendent and adding the sql text
    at run time?

    If you are using DADE, you will want to check out using the new SQLBuilder
    object included with RB 9 to update and change the SQL object. If not, try
    connecting a DBGrid to your dataset and see if the SQL code you added is
    actually having an effect on your data at the time ReportBuilder accesses
    it. ReportBuilder simply traverses your data as-is, there is no internal
    sorting so if your data is printing out of order it is most likely because
    the SQL code is not correct.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited August 2005
    After reading your post I was able to figure it out. Thanks
This discussion has been closed.