Hi,
I have customize a new table and new session. How can I display the data on session sort by section and length.
Eg:
-------------------------------------------------------------
| Section | Length | Qty |
-------------------------------------------------------------
| section B | 340 | 2 |
| section B | 103 | 18 |
| section A | 500 | 3 |
| section A | 205 | 10 |
| section A | 40 | 1 |
-------------------------------------------------------------
I wrote a code as below,
when run the session is display as below:
-------------------------------------------------------------
| Section | Length | Qty |
-------------------------------------------------------------
| section A | 40 | 1 |
| section A | 205 | 10 |
| section A | 500 | 3 |
| section B | 103 | 18 |
| section B | 340 | 2 |
-------------------------------------------------------------
Please advise.
I have customize a new table and new session. How can I display the data on session sort by section and length.
Eg:
-------------------------------------------------------------
| Section | Length | Qty |
-------------------------------------------------------------
| section B | 340 | 2 |
| section B | 103 | 18 |
| section A | 500 | 3 |
| section A | 205 | 10 |
| section A | 40 | 1 |
-------------------------------------------------------------
I wrote a code as below,
Code:
|****************** declaration section *********************
declaration:
table ttccus024 | Short Bar List
|******************** program section *********************
before.display.object:
get.record.field.readonly()
|********************** function **************************
Functions:
function get.record.field.readonly()
{
select tccus024.*
from tccus024
where tccus024.sect = :tccus024.sect and tccus024.lgth = :tccus024.lgth
order by tccus024.sect desc, tccus024.lgth desc
selectdo
endselect
}
-------------------------------------------------------------
| Section | Length | Qty |
-------------------------------------------------------------
| section A | 40 | 1 |
| section A | 205 | 10 |
| section A | 500 | 3 |
| section B | 103 | 18 |
| section B | 340 | 2 |
-------------------------------------------------------------
Please advise.