problem:order by sum(quantity*price) desc

edited November 2004 in FastReport 3.0
notes:
0.SQL is : select article_code, quantity, price from article order by sum(quantity*price) desc
1.I uses DBX, trial fastreport3.06: records always are ascend sequance -->Error
2. the way I get data is : SQLConnection + SQLQuery + DatasetProvider -->
ClientDataSet --> fastreport
3. SQLConnection + SQLQuery + DatasetProvider -->
ClientDataSet --> datasource --> dbgrid, records always are descend sequance
4.order by sum(quantity*price) asc, fr3.06 is right
5.same way with fastreport2.53: records always are descend sequance ->OK

best reguard

Comments

  • edited 10:20AM
    FR does not perform data sorting!!! Error is somewhere in DB side.
  • edited November 2004
    AlexTZ wrote:
    FR does not perform data sorting!!! Error is somewhere in DB side.

    sorry, i do not write clearly because my english is poor.
    first, I love fr2.53, I am evaluating the new fastreport3.x because the fastreport3.xx has a lot of good qualities than fastreport2.53. I hope fr3 has good and stonely version.

    I use the below sql clause:
    select article_code, sum(quantity) as quantity, price, sum(quantity*price) as amount
    from article
    group by article_code, price
    order by sum(quantity*price) desc

    I write the test program with delphi7 and DBX(SQLConnection+SQLQuery(above sql)+DatasetProvider-->ClientDataSet-->datasource-->dbgrid), records are descend sequance.

    but, when I get data through SQLConnection+SQLQuery(above sql)+DatasetProvider-->ClientDataSet-->fastreport, fastreport3.0x shows ascend sequence data.
    if I get data through ADOConnection+ADOQuery(above sql)+DatasetProvider-->ClientDataSet-->fastreport, fastreport3.0x shows descend sequence data.

    if I use fr2.53, fr2.53 shows the descend sequence data through DBX or ADO.

    I do not know what's reason to cause above case?

    thank you, best regard!

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.