Grouping based on an expression
Hi all.
I'm facing a challenge.
I've got this query:
select extract(month from sample.date_in) as Month, case sample.request
when 0 then 'Standaard'
when 1 then 'Navraag'
end as StandNavr, sample.request, staining.flags, sample.sample
from sample, staining
where sample.staining=staining.staining
and sample.date_in >= [img]style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />1 and sample.date_in <[/img][img]style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />2 order by Month, sample.request, staining.flags, sample.sample The field staining.flags is a calculated field. I've got 3 groups on my report. Two of them are no problem to create (Month & StandNavr). The 3rd group I want to base on an expression namely: IsBitSet(<ZeosQuery1."FLAGS">,0) When I run the report I see al three groups but the problem is that because of the presence of staining.flags in the select-statement I see group 3 multiple times. So instead of Month Standaard True False Navraag True False I get for example Month Standaard True False True False True False Navraag True False True False Anyone got an idea as how to solve this problem?? Greetz, Jeroen[/img]
I'm facing a challenge.
I've got this query:
select extract(month from sample.date_in) as Month, case sample.request
when 0 then 'Standaard'
when 1 then 'Navraag'
end as StandNavr, sample.request, staining.flags, sample.sample
from sample, staining
where sample.staining=staining.staining
and sample.date_in >= [img]style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />1 and sample.date_in <[/img][img]style_emoticons/<#EMO_DIR#>/tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" />2 order by Month, sample.request, staining.flags, sample.sample The field staining.flags is a calculated field. I've got 3 groups on my report. Two of them are no problem to create (Month & StandNavr). The 3rd group I want to base on an expression namely: IsBitSet(<ZeosQuery1."FLAGS">,0) When I run the report I see al three groups but the problem is that because of the presence of staining.flags in the select-statement I see group 3 multiple times. So instead of Month Standaard True False Navraag True False I get for example Month Standaard True False True False True False Navraag True False True False Anyone got an idea as how to solve this problem?? Greetz, Jeroen[/img]