?
Solved

Usage of lexical parameters in D2k Reports

Posted on 2003-11-29
1
Medium Priority
?
1,190 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 48

Accepted Solution

by:
schwertner earned 120 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
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…
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

800 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