Solved

Usage of lexical parameters in D2k Reports

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

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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…

856 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