Help - Search - Members - Calendar
Full Version: Problem with GroupHeader
Fast Reports forum > Fast Reports Products > FastReport 4.0
jlvidal
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.






gordk
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.
jlvidal
QUOTE(gordk @ Mar 9 2010, 12:51 PM) *
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
gordk
where did you try to convert it to numeric.
jlvidal
In band groupheader. I wrote it as an expresion of group with the function "Strtoint(Dataset.Telefono)"
gordk
you must get the query to return the correct sorting
fr only presents the data sent to it.
jlvidal
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??
evariste
You have to sort your data in dataset by phone number.

Regards,
Evariste
jlvidal
Thanks you very much!. Now, it works perfect.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.