I am trying to understand when to use SELECT with RLIST,
Select, Select by and Reduce.
Currently I have a dialog box that prompts for dates then
builds a cmd… 'SELECT tablename BY DATE WITH DATE '….
then calls RLIST(cmd…
If items were found then the list is saved to SYSLISTS and
I call a Rev Reporter item to print the list.
I seem to be having problems with the list and the order the keys
are in. Is this a correct way to do this or should I be using the
select by?
Bruce,
Basically use the best "selection" method for the job. If the keys were sorted when you saved them to SYSLISTS then the reports should appear in the correct order. Your example was sorting by date, was this what you were expecting?
RList selects are best when the select needs are complex and involve non-indexed fields. Btree.Extract, Reduce, Select..By are better for indexed fields. Select by itself is good for just a plain old selection of the entire table if no sort order is needed.
Bruce-
We've had trouble for a while with having the reporter do any sorting for us. We do all sorting ( both grouping and sorting) via the Rlist Select statements, and then save the list. We then tell the report to Getlist the saved list, and it seems to work ok.
Rlist(Statement, 4, 'MYLIST':@STATION,
,
)In reporter- Tools-Query-Selection Criteria
Change the Language to Basic+, and In Formula put
GETLIST MYLIST@STATION
Not a typo- no colon between Mylist and @station.
Hope it Helps-
Mike Ruane
WinWin Solutions Inc.
Mike & Don,
Thanks for the response.
Mike what you relayed is exactly what I am doing. The problem
is that in the report detail section I am trying to output two
fields that are multivalued then 9 fields that are single valued
then repeat for the next item; the m/v fields are only displaying
the first value. I have tried it without doing the getlist and just
start outputing and it display's multivalues.
The output sort of looks like…
mv1 mv1
mv2 mv2
mv3 mv3
single val single val single val single val
Only mv1 will display when I do the Getlist.
Thanks again.
Well of course it was a simple answer that I was over looking (Doohht!)
Unknow to me until the sort field had been altered to m/v from
single val. All forms were pointing to a mv value.
So now it works.
Thanks!