Condtional Group footer field based number of records

Stimulsoft Reports.NET discussion
Post Reply
Doron
Posts: 5
Joined: Wed Apr 05, 2023 9:42 pm

Condtional Group footer field based number of records

Post by Doron »

Hi Guys,

Under a group footer band I have sub total which could be multiple records or 1.
If I have 1 record I need to disable the field against the sub total that says: Sub total for PO: 12345
Show that field if number of records > 1

I need to find out the number of records per group.
How that can be done?

Thanks,

Doron
Lech Kulikowski
Posts: 7287
Joined: Tue Mar 20, 2018 5:34 am

Re: Condtional Group footer field based number of records

Post by Lech Kulikowski »

Hello,

You can set the Enabled property with the following expression:
Count(GroupHeaderBand1) != 1

Thank you.
Doron
Posts: 5
Joined: Wed Apr 05, 2023 9:42 pm

Re: Condtional Group footer field based number of records

Post by Doron »

Thanks Lech
Lech Kulikowski
Posts: 7287
Joined: Tue Mar 20, 2018 5:34 am

Re: Condtional Group footer field based number of records

Post by Lech Kulikowski »

Hello,

You are welcome.
Doron
Posts: 5
Joined: Wed Apr 05, 2023 9:42 pm

Re: Condtional Group footer field based number of records

Post by Doron »

Hi Lech,

Another thing I need to clarify in this regards.
How do I remove the gap for the sub total when there is only 1 record in the group?

Thanks,

Doron
Lech Kulikowski
Posts: 7287
Joined: Tue Mar 20, 2018 5:34 am

Re: Condtional Group footer field based number of records

Post by Lech Kulikowski »

Hello,

Without a report template, it isn't easy to say.

Thank you.
Doron
Posts: 5
Joined: Wed Apr 05, 2023 9:42 pm

Re: Condtional Group footer field based number of records

Post by Doron »

Hello,

Maybe you can improve upon that.

For instant in another report engine i could cover that area with a conditional object.
Which I can enter some conditions. It was cumbersome but did the job.

I am not using for now a template.

Thanks,

Doron
Lech Kulikowski
Posts: 7287
Joined: Tue Mar 20, 2018 5:34 am

Re: Condtional Group footer field based number of records

Post by Lech Kulikowski »

Hello,

Depending on the structure, you can use the CanShrink property or the Enabled property for the Panel component.

Thank you.
Doron
Posts: 5
Joined: Wed Apr 05, 2023 9:42 pm

Re: Condtional Group footer field based number of records

Post by Doron »

Hi Lech,

The CanShrink did the job and thanks for that.

1. In sub total I need to provide the number of transactions per sub total of the group.
I created a variable named: Count_Recs_for_Grp and added expression like this: Count(GroupHeaderBand1)

2.
It does not give me the right number, and instead of 3 records form one sub total it gives me like 83. The expression itself I use in the Enabled property expression: Count(GroupHeaderBand1) != 1
In the attached image you can see where the expression located, where the red arrow pointing to it.
I showed also sample sub total in the second image.

This is expression near the red arrow is: Total {Count_Recs_for_Grp} Transactions for {EOY_Rollover.GroupName}: {EOY_Rollover.RepGroup}

How can I get the specific number of records for any sub total? I skip 1 record.

Thanks,

Doron
Attachments
Number_of_Trans2.jpg
Number_of_Trans2.jpg (46.9 KiB) Not viewed yet
Number_of_Trans.jpg
Number_of_Trans.jpg (414.92 KiB) Not viewed yet
Post Reply