Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Reports with Lexical Paramters

RE: Reports with Lexical Paramters

From: Dasko, Dan <Dan.Dasko_at_cdicorp.com>
Date: Wed, 14 Mar 2001 08:38:03 -0800
Message-ID: <F001.002CC47A.20010314070120@fatcity.com>

Using lexical parameter in Developer Reports.

Enter the query like this.
Select
  emp_name
From
  employee
Where
  emp_salary > 100
  &lx_param

Then the Report Builder will create a user parameter lx_param. Next create a before form trigger and set the code something like this.

IF :dept = 'SALES' THEN
  :lx_param := 'and emp_dept = 10';
ELSE
  :lx_param := 'and emp_dept = 20';
END IF; Of course, :dept must be a user parameter entered via the parameter form etc.

This is pretty much the simplest case.

If you are trying to use a lexical parameter as a column name, it must be set with a default value that is correct.

Like this:
Select
  emp_name,
  &col1 dept
From
  employee
Where
  blah blah blah;

Then in the properties for &col1, you set a default value of emp_dept, then in the trigger you can change the column based on some other condition just like with the where.

This is about as advanced as I've been able to do and as you've no doubt found out, there is pitifully little documentation on how to do a lot of things in D2K.

Dan

-----Original Message-----
Sent: Wednesday, March 14, 2001 2:35 AM
To: Multiple recipients of list ORACLE-L

Hi Experts

Has anyone created a Report with lexial paramerters. Can u please a small sample report.

Thanks
Richard

This email message may contain privileged/confidential information and/or copyright material. It is intended only for the use of the person(s) to whom it
is addressed and any unauthorised use may be unlawful. If you receive this email by mistake, please advise the sender immediately by using the reply facility in your email software and delete the material from your computer.

The material contained in this message does not constitute a binding contract
with any company within the MTL Instruments Group plc. Opinions, conclusions
and other information in this email that do not relate to the official business
of this organisation shall be understood as neither given nor endorsed by it.

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: drichard_at_mtlindia.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).

This e-mail message has been scanned for the presence of all known computer viruses by the MessageLabs Virus Control Center. However, it is still recommended that you use local virus scanning software to monitor for the presence of viruses.
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Dasko, Dan
  INET: Dan.Dasko_at_cdicorp.com
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Wed Mar 14 2001 - 10:38:03 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US