In D2k reports, I need to construct a single report where the query should be changeable at run time. i.e., "where/order by" shall be added only at run time and it changes according to the discretion of the user.
I have a table called stud_details
(stud_id number, stud_name, varchar2(30), fat_name varchar2(30), class varchar2(12), rank number(2)).
The user should be able to get the report as he desires, i.e. he can order it by stud_id (or) stud_name (or) rank and so on. Similarly he can change his "WHERE" condition also.
The following is my query in "Query Dialog Box":
Select Stud_id, stud_name, rank from stud_details
The dialog box said "Two lexical parameters" created.
When running the report, it asks for two parameters:
Where_clause : where stud_name like 'S%' u
(user types here)
order_by : order by stud_id
(User types here)
I want to have the following clarification:
Being developer, I know the "where" and "order by" clauses and also database field names and hence, can type in the parameter field. But, We cannot expect users to be conversant with oracle/D2k/DB field names. In this situation, how can I make this dynamic report user-friendly? ie., get the parameter values from the user for "where/order by" and concatenate with the report query.
Guys, can I have your help. Urgent, pls.