Home » Developer & Programmer » Reports & Discoverer » Disable Or Enable Parameter Form (Report6i, Win2k and WinXP)
Disable Or Enable Parameter Form [message #304555] Wed, 05 March 2008 11:29 Go to next message
gnod
Messages: 19
Registered: December 2007
Junior Member
Hi,

I have 4 Parameters (From Invoice, To Invoice, Code, Port).
If the user input a data in "From invoice" and "To Invoice", the "Code" will be disable but if the "Code" has a data the "From Invoice" and "To Invoice" will be disable.
the "Port" is always enable..

How do I disable or enable? if ever, can someone else provide a sample file? I'm only a newbie in Report6i


Thanks..
Re: Disable Or Enable Parameter Form [message #304668 is a reply to message #304555] Thu, 06 March 2008 01:23 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell, no way in Reports.

However, two workarounds come to my mind at the moment: create your own "parameter form" using the Forms Builder and, depending on conditions you've mentioned, enable or disable desired form items.

Another way doesn't require Forms; create additional set of parameters - for every "real" parameter, which will appear on the parameter form, create its pair. In the AFTER-PARAMETER-FORM trigger, depending on values user has entered, calculate which "pair parameters" will be set to what values. In a report query, you'd then use these "pair" parameters instead of the ones user sees on the parameter form.
Re: Disable Or Enable Parameter Form [message #304765 is a reply to message #304668] Thu, 06 March 2008 09:20 Go to previous messageGo to next message
gnod
Messages: 19
Registered: December 2007
Junior Member
Hi,

Thanks for your reply.. is it possible to provide a sample file..


Thanks..
Re: Disable Or Enable Parameter Form [message #304776 is a reply to message #304765] Thu, 06 March 2008 10:00 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Sorry, but no. YOU might try and come back when you are finished! It may not work at first, but we'll try to help.
Re: Disable Or Enable Parameter Form [message #304843 is a reply to message #304555] Thu, 06 March 2008 22:01 Go to previous messageGo to next message
gnod
Messages: 19
Registered: December 2007
Junior Member
how do i modify my sql using this condition in the where clause?
if :p_awbcode is null, it will execute the :pinv_from and :p_inv_to.. if :pinv_from and :p_inv_to is null, it will execute :p_awbcode

WHERE    inv.comp_code = 'AATC' AND invd.comp_code = 'AATC'
         AND inv.port_code = :p_port
         AND (awb.code = :p_awbcode
         OR (SUBSTR (inv.invoice_no, 4) BETWEEN SUBSTR (:p_inv_from, 4)
                                            AND SUBSTR (:p_inv_to, 4)
         AND SUBSTR (inv.invoice_no, 1, 3) = SUBSTR (:p_inv_to, 1, 3)))


thanks.
Re: Disable Or Enable Parameter Form [message #304868 is a reply to message #304843] Fri, 07 March 2008 00:15 Go to previous messageGo to next message
Littlefoot
Messages: 20900
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Research use of LEXICAL parameters. These will let you create your own WHERE clause, depending on parameters' values.
Re: Disable Or Enable Parameter Form [message #304946 is a reply to message #304868] Fri, 07 March 2008 05:00 Go to previous message
gnod
Messages: 19
Registered: December 2007
Junior Member
thanks..
i already solve the script

AND awb.code = NVL (:p_awbcode, awb.code)
         AND SUBSTR (inv.invoice_no, 4) BETWEEN SUBSTR (NVL (:p_inv_from, inv.invoice_no), 4)
                                            AND SUBSTR (NVL (:p_inv_to, inv.invoice_no), 4)
         AND SUBSTR (inv.invoice_no, 1, 3) = SUBSTR (NVL (:p_inv_to, inv.invoice_no), 1, 3)
Previous Topic: From a pdf Report, How to diplay hyperlink result in a second window
Next Topic: help, help,help
Goto Forum:
  


Current Time: Wed Dec 07 20:41:21 CST 2016

Total time taken to generate the page: 0.71957 seconds