How to Sum Report Items Textbox.values in Group footer with reportViewer vb.net 2010
I need result.
Column A Column B Diff
a 1/05/12
0 <--- i get textBox.Value =DateDiff("D", Previous(Fields!Date.Value), Fields!Date.Value)
a 3/05/12
1
a 6/05/12
2
a) Total Diff is 3 <--- I need Every Group Total values
B 3/05/12
0
B 6/05/12
2
B 10/05/12
4
B) Total Diff 6
Grand Total 9
Please Help me...
August 1st, 2012 5:15am
Hi,
If you do not have column groupings, you can use below mentioned custom code
Dim values As Integer = 0
Function AddValue(ByVal newValue As Integer)
values = values + newValue
End Function
Function GetValue() As Decimal
GetValue = values
values = 0
End Function
Now, Add a column right yo diff column, also not down the textbox name diff column, suppose the name is Textbox4, add below expression in new cell
=Code.AddValue(ReportItems("Textbox4").Value)
In Group footer add this expression
=Code.GetValue()
The only problem here is, if you hide the new column this will not work, you can minimize width of a column.
- Chintak (My Blog)
Free Windows Admin Tool Kit Click here and download it now
August 1st, 2012 5:54am
Thank you very much, but i'm using Grouping column A and i'd try to your coding,i got Result value 0 only, not get expected result..
Thanks,
August 1st, 2012 7:45am
Hi Emalai,
If you already have a grouping on Column A, here's what you can do:
1. Right click on the Details section of your tablix control and select "Insert a New Row -> Outside Group Below"
2. In the New Row that gets added, place the expression as:
=RunningValue (Fields!ColumnB.Value, SUM, "Column_A_Group_Name")
Replace the "Column_A_Group_Name" with the actual name of your group.
Let me know if this does not work for you.
HTH.
Cheers,
IceQBPlease mark correct answers :)
Free Windows Admin Tool Kit Click here and download it now
August 1st, 2012 8:44am
THenk you sir, its very helpfull for me and lot of thank You :-)
August 2nd, 2012 12:40am