Click here to Skip to main content
15,885,869 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
Hey guys I have a small issue with a report I am creating. Basically I am comparing data across months in the same column group.

--------------------------------------------------------------
Year
--------------------------------------------------------------
2006-----------Difference------2007----------Difference
--------------------------------------------------------------
Jan----Feb-----(want to hide)--Jan --- Feb---(Jan-Jan)--(Feb - Feb)
100--- 250--------------------150-----300---50---------50

--------------------------------------------------------

VB code to Get the Previous
VB
Public Shared previous as Integer
Public Shared current as Integer
  Public Shared Function GetCurrent(Item as Integer) as Integer
     previous=current
     current=Item
     return current
  End Function

  Public Shared Function GetPrevious()
     return previous
  End Function


Current expression in Diffecence coumn: =Code.GetCurrent(Sum(fields!Month.Value)) - iif(Code.GetPrevious()=0,0 ,Code.GetPrevious())

This all working fine but once I set the first "Difference" column's visibility to false all the figures get messed up.

So all I need to is hide the first "Difference" column but still be able to calculate the difference between Jan of each year.

Thanks for your help.
Posted
Comments
Maciej Los 30-Mar-14 13:38pm    
Not clear!
frostcox 30-Mar-14 14:06pm    
If I'm not being clear all you have to do is ask for more clarity. We're on here to receive help from more experienced developers so for you to just go around down voting questions instead of trying to help is just rude.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900