Solved

Usage of lexical parameters in D2k Reports

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

Question has a verified solution.

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

Suggested Solutions

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…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

863 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

20 Experts available now in Live!

Get 1:1 Help Now