BUG:sum(..) in fastreport3.03 & 3.05

edited November 2004 in FastReport 3.0
group header: condition is qrySellStock."account"

masterData1:

on group footer band:
[SUM(<qrySellStock."qty">,masterData1, 1)] is OK,
[SUM(<qrySellStock."qty">*<qrySellStock."price">,masterData1, 1)] is sometimes incorrect data

note: I use DBX with fr3.03 & fr3.05

why?

Comments

  • edited November 2004
    i test that ADO, BDE are ok, only dbx has above case.
    note: fr3.03 & fr3.05
  • edited November 2004
    i test that dbx is ok with fr2.53

    i hope author can check it.

    best regard!
  • edited 9:44AM
    DBX is unidirectional dataset, this may cause such problems.
  • edited 9:44AM
    AlexTZ wrote:
    DBX is unidirectional dataset, this may cause such problems.
    I do not know this problem is caused by DBX, because:
    1. the way I get data is : SQLConnection + SQLQuery + DatasetProvider -->
    ClientDataSet --> fastreport
    2. I uses same way, fastreport2.53 has no such problems
    note: I use mssql2000

    thanks, best regard! ;)
  • edited 9:44AM
    Do you able to make a demo that uses clientdataset only? I don't have mssql on my PC.
  • edited November 2004
    I write TfrxDBXQueryEx as TfrxIBXQuery(fr3_DeveloperManual-en.pdf)
    TfrxDBXQueryEx = class(TfrxCustomQuery)
    private
    FDatabase: TfrxDBXDatabase;
    FClientDataSet: TClientDataSet; //***
    procedure SetDatabase(const Value: TfrxDBXDatabase);
    protected
    procedure Notification(AComponent: TComponent; Operation: TOperation); override;
    procedure SetMaster(const Value: TDataSource); override;
    procedure SetSQL(Value: TStrings); override;
    function GetSQL: TStrings; override;
    public
    constructor Create(AOwner: TComponent); override;
    class function GetDescription: String; override;
    procedure UpdateParams; override;
    property Query: TClientDataSet read FClientDataSet; //****
    published
    property Database: TfrxDBXDatabase read FDatabase write SetDatabase;
    end;

    I create a temporary SQLQuery and TDataSetProvide when I get data by SQL.
    so, I can retrive data through SQLConnection + SQLQuery + DatasetProvider -->
    ClientDataSet --> fastreport.
    but I meet two problems:
    1.sum(expression) sometimes error data, but sum(OneField) is right data
    2.order by sum(expression or OneField) desc, I get data always is ascend data,
    but order by OneField desc, is descend data
    note:
    1.above case happend with fr3.xx and DBX. but BDE and ADO has not above case
    2.fr2.53 has no above case with BDE, ADO and DBX

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.