Solved

Usage of lexical parameters in D2k Reports

Posted on 2003-11-29
1
1,182 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

760 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now