
Hi,
I copied standard report design of customer statement report , created a customized design (which will use same DP, Controller, Contract classes) and then added a footer in it as part of customization.
I want to show a Closing balance in the footer with some big font. You can see in the below screen shot. I want to show the exact same value of this field into Footer.
When i used that in the footer, i have to use it with Aggregate function i.e. Sum() and that is creating issue in below scenario.
I have 2 customers. 1st having balance let's say $100. and 2nd having balance $0 (assume that it's a newly created customer and doesn't have any transactions).
In this scenario, when i run the report only for these 2 customers, the 2nd customer would show $100 balance as well.
Has anyone faced this? Can you please guide how to show correct value i.e. $0 for the 2nd customer who doesn't have any transactions?
*This post is locked for comments
I have the same question (0)To fix this issue, I put the value of ClosingBalance field into the hidden textbox in body part using Code.SetData(Fields!ClosingBalance) in the expression and in the footer , i received that value using Code.GetData(1,1) value.
Below are these two functions need to be put in Report Properties -> Code section.
Shared Data1 as Object
Shared Data2 as Object
Shared Data3 as Object
Public Function GetData(Num as Integer, Group as integer) as Object
if Group = 1 then
Return Cstr(Choose(Num, Split(Cstr(Data1),Chr(177))))
End If
if Group = 2 then
Return Cstr(Choose(Num, Split(Cstr(Data2),Chr(177))))
End If
if Group = 3 then
Return Cstr(Choose(Num, Split(Cstr(Data3),Chr(177))))
End If
End Function
Public Function SetData(NewData as Object,Group as integer)
If Group = 1 and NewData > "" Then
Data1 = NewData
End If
If Group = 2 and NewData > "" Then
Data2 = NewData
End If
If Group = 3 and NewData > "" Then
Data3 = NewData
End If
Return True
End Function