FastReport 4.0 SUM problem

edited May 2012 in FastReport 4.0
We have a problem with SUM FastReport

We are currently developing a billing program. For the use of invoices we count on a field (BonTotaal) together with the SUM function.

But if we add everything, for example: 25 + 25 + 5. Then come down the bon 55. He, however, treated the field as a String, because the outcome is this: 25255!

The content of the field is not a String but a Double!

What do I do wrong, or what is the solution?

Hear from you ...


Antoine

Comments

  • gpigpi
    edited 8:40PM
    What version of FR do you use?

    Try latest 4.12.6
  • edited 8:40PM
    gpi wrote: »
    What version of FR do you use?

    Try latest 4.12.6

    Sorry but we have the Basic version purchased! >>>    I believe that simply work must SUM?![img]style_emoticons/<#EMO_DIR#>/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> Isn't there a simple solution? Hear from you! Gr Anton[/img]
  • gpigpi
    edited 8:40PM
    What version number of FR do you use?
    Attach your report template here
  • edited 8:40PM
    gpi wrote: »
    What version number of FR do you use?
    Attach your report template here

    We work with FastReport version 4.12.

    Is there an update available, in order to fix that bug?

    Thank you in advance!

    Anton
  • gpigpi
    edited 8:40PM
    What bug? All works OK. See attach
  • edited 8:40PM
    gpi wrote: »
    What bug? All works OK. See attach

    Hello, I believe that something is not right must be yet ...

    Although, we work with SQLite3 in combination with ZeosLib 7.0.0 Alpha. Can that maybe a cause?

    Does anyone have experience with working with ZeosLib and FastReport Server ...

    Maybe even a solution for our problem with SUM?

    Thank you!

    Anton
  • edited 8:40PM
    Hi, I meant of course not as shown in the example. ...

    I use the SUM function with a DataField. And then into a Master Detail Band. The price of the vouchers must be added together, by means of SUM. The bottom than the total amount of the invoice comes bon.

    Perhaps clearer now?

    Gr Anton
  • gpigpi
    edited 8:40PM
    Try to convert your field's values to float
  • edited 8:40PM
    Hello, all my Fields with prices are set as Float 4.4.

    Greetings
  • edited 8:40PM
    Hi,

    everyone an ID?

    It must be work this evening!

    grtz
  • gpigpi
    edited 8:40PM
    Attach small demo project with problem based on FRDemo database
  • edited 8:40PM
    gpi wrote: »
    Attach small demo project with problem based on FRDemo database

    It is not yet possible to me now to make a demo, the project and the database is quite large.

    It is a database with 10 tables. And 1 View. That View looks as follows:
    Select
    Afleverbonnen.ID as BonNummer,
    Afleverbonnen.KlantID as KlantID,
    Afleverbonnen.FactuurID as FactuurID,
    Afleverbonnen.Notitie as Notitie,
    Afleverbonnen.Datum as Datum,
    SUM(AfleverbonArtikel.Aantal) as Artikelen,
    CAST(SUM(AfleverbonArtikel.Prijs) as Double) as Bontotaal
    From Afleverbonnen
    Left Outer Join AfleverbonArtikel On Afleverbonnen.ID = AfleverbonArtikel.AfleverbonID
    Group By AfleverbonArtikel.AfleverbonID
    

    We use the SUM function in "Bontotaal".

    I look forward to hearing from you!

    Anoine Gr
  • gpigpi
    edited 8:40PM
    Check Bontotaal field type in Delphi's dataset
  • edited 8:40PM
    Hi,

    We looked into it a little more and it seems we have this problem:
    http://www.fast-report.com/en/forum/?p=/discussion/3135
    http://www.fast-report.com/en/forum/?p=/discussion/comment/22026

    We tried to use the given solution, thus editing frx2xto30.pas and running the Recompile Wizard, this changes nothing.

    Is there any other place where this faulty code could be used, and where we can change and successfully recompile it?
  • edited 8:40PM
    Has anyone of you maybe a solution? Time is running out ...

    Thank you!

    Gr Anton

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.