Jump to content
Changes to the Jaspersoft community edition download ×

How to use lag functions in jasper

Go to solution Solved by udaysriturangi,

Recommended Posts


  I want to create a table something like this,

A                      B         C             D                E

 Jan                 0          2             1         A+(B-C) = 1

Feb                  1          4            3          1+(4-3)=2

Mar                  2          6            5        2+(6-5) =3

Apr                  3   . . .

first row ,Second column  value should always zero, and last column last value should be displayed as second row second column second value. and should be repeted until end of the table, Is their any way to acheive this in jasper, If so Please help!!!

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

Hi imran,

In query, i am using lag function, so that i am able to get last row last column data in second row, But it is not allowing me to do calculation saying nested window functions are not allowed,It is just simply printing previous row value.

my table data:

January       0                        55019.17      221         242                  0    54556.17
February      54556.17         32139.07      20          5967115.32    0    -5934996.25
March         -5934996.25    18026.1          493       0                      380    17153.1
April             17153.1            0                       6           0                       0    -6

Thanks ,


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...