troubleshooting Question

Max value in SSRS 2005

Avatar of scvens
scvens asked on
Oracle DatabaseMicrosoft SQL Server 2005Microsoft SQL Server 2008
1 Comment1 Solution1310 ViewsLast Modified:
Hi i am working on a report and  i have a column which contains values which are extracted by calculating values in other columns. Some thing  
 
like this there are 4 columns  A B C & D Now
 A= fields!XXXX.value
B= fields!123.value
c= iif(previous(fields!XXXX.value) = fields!XXXX.value,fields!123.value,0)
D=code.add(reportitems!textbox11.Value.ToString) ie:-Textbox 11 is notthing but columnC  as C  dosent have  a field name i could not use running values function to sum up the values in column C thats why  i  wrote a custom code that sums up values which are in column C step by step. Now in D i got the step by step summing of values in C now in the last column of D i will get total sum of C values. Now my task is to extract Max value from Column D. For that i tried  using this expression = max( code.add(reportitems!textbox11.Value.ToString))
but it gives me Error.  Now i dont know  how  to display the max value of column D. As  i need Max value of column D to do further Calculations.  Can you please help me out by letting me know how i can extract  Max value of Column D.
 
My custom code to ADD Values in Column C 1 by 1 is
 
DIM totalsum as integer = 0
public function add(byval  wattrating as integer) as integer
 totalsum =  totalsum + wattrating
return totalsum
end function.

DO i have to write other custom code to get max value if yes then how do i write the expression to call max value  using custom code?

ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros