Page 1 of 1

In a GroupHeaderBand -> 2 types of results

Posted: Wed Feb 15, 2012 11:57 am
by Jennypi
Hello all,

In a report, I have 2 queries, let's say the 2nd one is the detail of the 1st one. Except that not all the entries of query1 will have detail in query2.
So I have my group header that groups according to a field in query1, and then I would like to treat separately the 2 types of entries.
If "field1" is empty in query1 -> I show some databands.
if field1 is not empty -> I show some others, containing query2 (the details)

I've tried different things, like
-moving the databands,
-putting a afterprint condition in the GroupHeaderBand that plays with databand...enabled=true/false depending on if field1 is empty or not
But can't managed to have what I want...
DataBand 3 and 6 are indeed printed when field1=0, but the other ones are not printed when field1!=0

Thanks for your help.
Here is the link to the report and here is what I want to do:
Image

In a GroupHeaderBand -> 2 types of results

Posted: Thu Feb 16, 2012 3:00 am
by HighAley
Hello.
Jennypi wrote:In a report, I have 2 queries, let's say the 2nd one is the detail of the 1st one. Except that not all the entries of query1 will have detail in query2.
So I have my group header that groups according to a field in query1, and then I would like to treat separately the 2 types of entries.
If "field1" is empty in query1 -> I show some databands.
if field1 is not empty -> I show some others, containing query2 (the details)

I've tried different things, like
-moving the databands,
-putting a afterprint condition in the GroupHeaderBand that plays with databand...enabled=true/false depending on if field1 is empty or not
But can't managed to have what I want...
DataBand 3 and 6 are indeed printed when field1=0, but the other ones are not printed when field1!=0
Please, try to set the Condition of the DataBand3 and DataBand6 like on the attached image and the Condition of the other Data Bands with expression "field = 0".
If it will not help, please, send us any data for your report.

Also it's better to use Header Band instead of the DataBand2 and DataBand6.

Thank you.

In a GroupHeaderBand -> 2 types of results

Posted: Thu Feb 16, 2012 5:22 am
by Jennypi
Hi

Thanks for your reply.
Defining the conditions as you described didn't fix the problem.
Please find attach the report with the csv sources, the 1st csv source and the 2nd csv source.
You can see that for plot 71, which has detail in 2nd source, databands are not shown.

Thanks in advance.

In a GroupHeaderBand -> 2 types of results

Posted: Thu Feb 16, 2012 5:57 am
by Jennypi
Oops, I forgot to delete my "enabled" code in the BeforePrint event :)

So now, with the conditions you told me, it's working perfectly, thanks a lot for your help.

In a GroupHeaderBand -> 2 types of results

Posted: Thu Feb 16, 2012 8:04 pm
by Andrew
Hello,

Great!

Have a nice day!
Thank you.