Solved

Usage of lexical parameters in D2k Reports

Posted on 2003-11-29
1
1,185 Views
Last Modified: 2007-12-19

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.

For e.g:
I have a table called stud_details
(stud_id number, stud_name, varchar2(30), fat_name varchar2(30), class varchar2(12), rank number(2)).

Required functionality:

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
&where_clause
&order_by
*****

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.

Srigupta
0
Comment
Question by:srigupta
1 Comment
 
LVL 47

Accepted Solution

by:
schwertner earned 30 total points
ID: 9842155
You are right.
You have to sort out different cases and to name them in user friendly sentences like

1. Daily report
2. Weekly report
3, department report
........

You have either to pass the parameters 1, 2, 3 from a form to the report or to use a LOV in the parameter form of the Report. After that in a trigger "After parameter Form" analyze the choosen parameter on construct the needed values in the lexical parameters.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…
Via a live example, show how to take different types of Oracle backups using RMAN.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question