General information
Title:
Displaying Updated Grid Contents
I have a medical system a which records patient events.
In the SQL below I display the cursor BOE contents in a grid which works fine.
This displays patient events in date order.
I want the user to be able to sort records in a different order, i.e. by event type rather than event date. I have tried putting the code below in the HEADER click code with "order by events.etype", but as soon as you click on the grid header the displayed grid blanks out.
So basically the question is: once you have displayed the contents of a cursor on a grid, can you re-sort or re-query again, thus updating the cursor, and display the updated cursor on the same grid?
Code used is:
select events.mno, events.bkno, events.date, events.estatus, estatus.name as status, events.etype, etype.name as type, events.evloc, evloc.name as loc, events.keyw, keyw.name as staff ;
from tcdata!events ;
join tcdata!etype ;
on etype.etype=events.etype ;
join tcdata!evloc ;
on evloc.evloc=events.evloc ;
join tcdata!keyw ;
on keyw.keyw=events.keyw ;
join tcdata!estatus ;
on estatus.estatus=events.estatus ;
where events.mno=nmno .and. events.can=0 ;
order by events.date desc ; && Need to order by another field and display
into cursor boe
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only