WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: Save value of previous row's column to a global variable

Save value of previous row's column to a global variable

by mbsolar :: Rate this Message:

| View in Thread

I am trying to save the value of a rows column to a global variable that I can used in the following row for a condition. I could use help in retieving the previous row in a table's (or dataset) column value to be used in a condition in the following row (or dataset) of that table.

I have declared the global variable in the initialize script of the report (I had tried to set this up in the Create script of the table. I had the same result.)

I set up the condition to compare the global varible to the current row's column value in the Create script of the table's row followed by the state ment to set the global varible to be equal to the row column value in the Create script of the table's row.

Condition always seem to be true a row too late. I am obviously setting the global varible too late or executing the coondition too soon.

Other variations I have tried result in worse results. I am still unsure of the javascript syntax, as well as BIRT's different areas for placing script.

The version of BIRT I am using is 2.2.2

Thanks,
Mike

 « Return to Thread: Save value of previous row's column to a global variable