US and Worldwide: +1 (866) 660-7555
Results 1 to 3 of 3

Thread: Access value of previous row and next row in

  1. #1
    Join Date
    Mar 2010
    Posts
    22

    Question Access value of previous row and next row in PRD

    I am trying to access the result of an SQL query from inside the Javascript or BSF function in Pentaho report designer.
    I am able to access the value of current row when I use the function dataRow.get("Col_Name") and put it in the Details band of the report.
    But is there a way I can access the value of previous row and next row values from the current row?

    Thanks...
    Last edited by test001only; 04-09-2010 at 03:07 AM.

  2. #2
    Join Date
    Oct 2007
    Posts
    235

    Default

    As far as I know you can't get to the values of any thing but the current row in the functions and formula. Your going to need to find another way. Maybe some way of getting the values you need from the other rows into the current row.

    A change to the query to return this as well or I think there is an analytic query step in kettle which lets you get the nth row before or after the current row. Kettle can then be used as an input for prd

    Good luck

    Wil Selwood
    SQL: as much of a standard as the English language

  3. #3
    Join Date
    Mar 2010
    Posts
    22

    Default

    Quote Originally Posted by wselwood View Post
    As far as I know you can't get to the values of any thing but the current row in the functions and formula. Your going to need to find another way. Maybe some way of getting the values you need from the other rows into the current row.

    A change to the query to return this as well or I think there is an analytic query step in kettle which lets you get the nth row before or after the current row. Kettle can then be used as an input for prd

    Good luck

    Wil Selwood
    Thanks Wil Selwood!... I would try to find some other way of doing this.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •