How to do create newField from other field in GroupHeader or GroupFooter?

Stimulsoft Reports.NET discussion
Post Reply
MMAASS
Posts: 4
Joined: Fri Aug 21, 2009 12:59 pm

How to do create newField from other field in GroupHeader or GroupFooter?

Post by MMAASS »

Hi!

I need grouped data in my Report and show summarize in GroupHeader Or GroupFooter.
Sum(Field1) & Sum(Field2)

And calculate newField from Sum(Field1) & Sum(Field2).

so:

If Sum(Field1) = 0 Then
newField = Sum(Field2)
Else If Sum(Field2) = 0 Then
newField = Sum(Field1)
Else
newField = Sum(Field1) / Sum(Field2)
End If


How to do create newField that show in all groups?
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to do create newField from other field in GroupHeader or GroupFooter?

Post by Edward »

Hi

You can use IIF function and Totals for this as you can see it in the attached report. Please open it in the Demo.exe sample application from the standard installation.

Thank you.
Attachments
221.SimpleGroupTotalsIIF.mrt
(20.52 KiB) Downloaded 178 times
MMAASS
Posts: 4
Joined: Fri Aug 21, 2009 12:59 pm

How to do create newField from other field in GroupHeader or GroupFooter?

Post by MMAASS »

Hi.
Thank you for answer.

I can't use IIF. Because I have more one conditions and IIF use for one condition. I use Switch structure And resolve my problem.
Edward
Posts: 2913
Joined: Fri Jun 09, 2006 4:02 am

How to do create newField from other field in GroupHeader or GroupFooter?

Post by Edward »

Hi

Please let us know if any help is required.

Thank you.
Post Reply