If Condition to Run Report [message #662633] |
Mon, 08 May 2017 06:34 |
|
hissam78
Messages: 193 Registered: August 2011 Location: PAKISTAN
|
Senior Member |
|
|
We have designed one Form in Forms 6i to Call the report,
it is working fine,
now the user want to see all the records, either Form parameter field is blank or with Selection parameter,
For example
if
Project code = 10
Date = 10-04-2017
Company = null
so the report should run for all the companies having project code 10 and date 10-04-2017,
how we can acheive, somebody can help us?
thanks
|
|
|
Re: If Condition to Run Report [message #662635 is a reply to message #662633] |
Mon, 08 May 2017 06:59 |
cookiemonster
Messages: 13943 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
So you want it to either find rows where company = parameter or not restrict by company if parameter is null?
That's a simple one line where clause using OR. Have a think about it.
|
|
|
|
|
|
Re: If Condition to Run Report [message #663640 is a reply to message #663558] |
Mon, 12 June 2017 03:30 |
cookiemonster
Messages: 13943 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Or you could leave p_company null and have the simpler:
AND (company = p_company or p_company is null)
And that case won't work as you've written it - you need to compare the result to something.
|
|
|
|
Re: If Condition to Run Report [message #663656 is a reply to message #663655] |
Tue, 13 June 2017 09:58 |
|
Michel Cadot
Messages: 68694 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
SQL> select to_date('10-Apr-2017') from dual;
select to_date('10-Apr-2017') from dual
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected
|
|
|