Hi Rueben,
Let said I want to display data consists of campus, faculty, level, course, total_student, scholarship, total_scholarship where there is 5 types of scholarship, i.e. A, B, C, D and E. The campus, faculty, level, course, total_student will be assigned to array first dimension while scholarship and total_scholarship will be assigned to array second dimension. How can I write the 4GL and display the array as screen record in per file? And how to define the array variable in static and dynamic array?
Your help is much appreciated.
Thank you.
Regards,
Cheong
I don't think you have provided enough information for anyone to give you a definitive solution. If I was a junior developer in this situation I would be going back and asking for database schema (if I was to guess I'd say dimension tables for campus, faculty, level, course, student, where the table for student contained a column containing scholarship grade (A-E) and what campus/faculty/level/course they were enrolled in) and a mock screenshot of what was required.
Following the tutorial here
http://4js.com/online_documentation/fjs-genero-manual-tutorial-html/#genero-tutorial-topics/c_fgl_TutChap07_001.html you could produce a screen that lists a row for each student showing their campus/faculty/level/course/scholarship in seperate columns but I suspect you want to summarise that.
So I suspect you may end up with an array similar to ...
define arr dynamic array of record
campus_id integer,
campus_name string,
faculty_id integer,
faculty_name string,
level_id integer,
level_name string,
course_id integer,
course_name string,
student_total integer,
scholarship_a integer,
scholdarship_b integer,
scholarship_c integer,
scholarship_d integer,
scholarship_e integer,
scholarship_total integer
end record
taken through to a screen that could look like
Campus Faculty Level Course Student Count A-Schol B-Schol C-Schol D-Schol E-Schol Total Schol
Xxxxxx Xxxxxxx 99999 XXXXXX 9999 999 999 999 999 999 9999
Xxxxxx Xxxxxxx 99999 XXXXXX 9999 999 999 999 999 999 9999
Xxxxxx Xxxxxxx 99999 XXXXXX 9999 999 999 999 999 999 9999
Total 9999 999 999 999 999 999 9999
but I'd want to know for sure that is what you wanted before coding.
Reuben