jmathew
5th May 2004, 16:41
Hi,

We have a problem in sorting. The session is of the type "Chart" and not "Report". So all sorting needs to be done in the script only before the data is taken to the chart. There is a problem in sorting which is explained below with an example;

Example:

Table 1: titem700
Fields: 1) ncr_number, 2) ncr_type, 3) work_centre, 4) amount

Table 2: titem702
Fields: 1) ncr_number 2) decision_type

We would like to get data from both tables and sort the same by the fields 4) amount for each 3) work_center from Table 1 for a some of the 2) decision_types in Table 2 and send the data to the chart.

How is this possible....

Is is possible to sort data in a graph like in reports or it needs to be done in the session script.

Can someone help!!!

Regards,
John.

lbencic
5th May 2004, 17:15
I'm not a chart expert, I believe it must be part of the program script though. Maybe there are functions to activate the sort from the chart, not sure.

For sorting, though, you could put those into an array and sort the array using qss.sort. Try a search on the boards for qss.sort to see other posts. Here's a wiki link to a sample program.

qss.sort sample program (http://www.baanboard.com/programmers_manual_baanerp_help_functions_searching_sorting_data_example)

Good luck