Hi..I have a problem here.I can display the subtotals but I don't want to display subtotal if there is just a class.Please help me,thanks. More details are below:
The description was quite vague, but if you mean that if you have more than 1 class instance, then you want to show/calculate the subtotals and
not do this if there is only a single instance then you could test for this. If Class A,B,and C are
instances of the same single class then you could do the code as follows by using a collection:
Dim MyClasses As New List(Of MyClass)
Dim A As New MyClass
Dim B As New MyClass
Dim C As New MyClass
MyClasses.Add(A)
MyClasses.Add(B)
MyClasses.Add(C)
'...later on in processing
If MyClasses.Count > 1 Then
'Show subtotal caluclations
Else
'Do not show subtotal caluclations
End If
lee123456
Member
72 Points
138 Posts
How to manipulate the visibility of subtotal?
Sep 26, 2011 11:44 AM|LINK
Hi..I have a problem here.I can display the subtotals but I don't want to display subtotal if there is just a class.Please help me,thanks. More details are below:
Class A
88
99
100
subtotal 287
Class B
100
100
100
subtotal 300
grand total 587
But if there is just a class,as below:
Class C
88
11
22
grand total 121
matyvegan
Participant
839 Points
261 Posts
Re: How to manipulate the visibility of subtotal?
Oct 20, 2011 08:37 PM|LINK
I dont understand ur problem.
Thanks!
atconway
All-Star
16846 Points
2756 Posts
Re: How to manipulate the visibility of subtotal?
Oct 27, 2011 06:02 PM|LINK
The description was quite vague, but if you mean that if you have more than 1 class instance, then you want to show/calculate the subtotals and not do this if there is only a single instance then you could test for this. If Class A,B,and C are instances of the same single class then you could do the code as follows by using a collection:
neon2
Member
44 Points
48 Posts
Re: How to manipulate the visibility of subtotal?
Oct 28, 2011 11:19 AM|LINK
can not understand the problem, can u post with some example, and for object query u can use LINQ
Happy Codding