kamsyk
1st June 2011, 16:33
Hi All,
is there a way how to move in selectdo loop back to the previous row?

thanks
Kamil

mark_h
1st June 2011, 16:53
Try looking at the db.* functions - like db.le(). Of course if you explain what you are trying to do there might be a better solution.

kamsyk
6th June 2011, 10:55
Try looking at the db.* functions - like db.le(). Of course if you explain what you are trying to do there might be a better solution.

Thanks for your help. I needed to display a calculated amount for items in a report. The items are grouped. The goal was to calculate total amount of the group and display it in each group item (line in report). My idea was to go through the group item rows in the report selectdo without printing them and calculate the total amount. Then go back to the first group item row and go through them again and print them with the calculated total amount. That is why I asked if it is possible to move back in the selectdo.

I did it in another way finally, I used the table alias. I go throught the item rows and call a function which calculates the total amount for each item. The function using the table alias, it goes through the same table rows in another selectdo loop.

Kamil

ahmer91
7th June 2011, 11:40
Use the report script to get the desired output
before.layout
after.layout