In a GroupHeaderBand -> 2 types of results

Stimulsoft Reports.NET discussion
Post Reply
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

In a GroupHeaderBand -> 2 types of results

Post 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

In a GroupHeaderBand -> 2 types of results

Post 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.
Attachments
1651.ConditionEnabled2.png
1651.ConditionEnabled2.png (39.15 KiB) Viewed 1275 times
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

In a GroupHeaderBand -> 2 types of results

Post 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.
Jennypi
Posts: 361
Joined: Mon Nov 17, 2008 7:13 am
Location: France

In a GroupHeaderBand -> 2 types of results

Post 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.
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

In a GroupHeaderBand -> 2 types of results

Post by Andrew »

Hello,

Great!

Have a nice day!
Thank you.
Post Reply