Expression Group Header is mixing up over the report...

edited April 2016 in FastReport VCL 5
Good Day every1,

i need my Data to by ordered by certain Names.


to do so, ive made that expression for the Group Header:
[iif((<frxDBDataset1."BAUSTELLE_1">=7500) OR (<frxDBDataset1."BAUSTELLE_1">>=4001) AND (<frxDBDataset1."BAUSTELLE_1"><=4999),
'Projekte',
iif(<frxDBDataset1."BAUSTELLE_1">=7600,
  'Aussenbaustellen',<rvk>))]
Note: the last "else case" is outsourced to the code tab due its complexity. Anyway hier the Outsourced var:
if (<frxDBDataset1."KOSTENSTELLE"> mod 100>=21) and (<frxDBDataset1."KOSTENSTELLE"> mod 100<=29) then rvk:='RV-Kontraktoren' else rvk:='Rahmenvertrag';



In the end i want my Report to show up like this:

Projekte:
4001 XY 140??????¬ ...
4002 XY 240??????¬ ...

Aussenbaustellen:
7801 XY 140??????¬ ...
7802 XY 240??????¬ ...


But actually its more like this

Projekte:
4001 XY 140??????¬ ...

Aussenbaustellen:
7801 XY 140??????¬ ...


Projekte:
4002 XY 240??????¬ ...

Aussenbaustellen:
7802 XY 240??????¬ ...



Well, i taught that FR will order the rows to the Strings i created in the expression... But its kinda mixed up,...


Best Regards



EDIT:
I've managed to bypass this Problem by using a SQL Statement to order the Datafield. However id like to knew if its possible to keep groups together how its desired? (Yeah, i know the "Keep Groups together Checkbox" but its not working here...

>

Comments

  • gpigpi
    edited 12:11AM
    wrote:
    I've managed to bypass this Problem by using a SQL Statement to order the Datafield.
    This is one right way. Dataset should be sorted by group conditions

Leave a Comment