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 9:57PM
    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

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.