Problem with GroupHeader

edited 6:57AM in FastReport 4.0
Hello!
First, sorry for my english, my level is low.
i have a report where there are two groups. The first group is on the first page and the second group on the second page. The datasets are different. The sql querys have a correct sentence "order by ... asc". Well, my problem is that the second group is not grouped properly.

Example:

Records of SQL query

Telephone----Date
Hour
Money

966120548---02/02/2010---15:25:36---0.1256
966120548---03/02/2010---13:30:40---0.6829
966120548---03/02/2010---14:25:28---0.3698
965120504---03/02/2010---09:30:20---0.2514
966120548---05/02/2010---16:28:00---1.2580

I have the break by the field "Telephone" in my second groupheader, but the result is the next:

Telephone----Date
Hour
Money

966120548
02/02/2010---15:25:36---0.1256
03/02/2010---13:30:40---0.6829
03/02/2010---14:25:28---0.3698


965120504
03/02/2010---09:30:20---0.2514

966120548
05/02/2010---16:28:00---1.2580


When the correct result should be:

965120504
03/02/2010---09:30:20---0.2514

966120548
02/02/2010---15:25:36---0.1256
03/02/2010---13:30:40---0.6829
03/02/2010---14:25:28---0.3698
05/02/2010---16:28:00---1.2580

Why does it happens?. Please, Can someone help me?

Thank you very much.






Comments

  • gordkgordk St.Catherines On. Canada.
    edited 6:57AM
    what is the underlying data type of the telephone field,(String I'll bet)
    you are expecting a numeric sort on a string can't do must convert string value to numeric first.
  • edited 6:57AM
    gordk wrote: »
    what is the underlying data type of the telephone field,(String I'll bet)
    you are expecting a numeric sort on a string can't do must convert string value to numeric first.

    Yes, it`s a string. I have changed a integer but it continues working the same way. Already I don't know what to do
  • gordkgordk St.Catherines On. Canada.
    edited 6:57AM
    where did you try to convert it to numeric.
  • edited 6:57AM
    In band groupheader. I wrote it as an expresion of group with the function "Strtoint(Dataset.Telefono)"
  • gordkgordk St.Catherines On. Canada.
    edited 6:57AM
    you must get the query to return the correct sorting
    fr only presents the data sent to it.
  • edited 6:57AM
    I have changed it in query but i have the same problem.

    The original query is:

    Select Telephone, Date, Hour, Duration from Cosumption


    The modified query:

    Select Convert(integer,Telephone) Telephone_C, Date, Hour, Duration from Cosumption


    What is the problem??
  • edited March 2010
    You have to sort your data in dataset by phone number.

    Regards,
    Evariste
  • edited 6:57AM
    Thanks you very much!. Now, it works perfect.

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.