If Condition to Run Report [message #662633] |
Mon, 08 May 2017 06:34 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/06b42bb1d9c7dd3931310cac212d7c22?s=64&d=mm&r=g) |
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 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 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 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
cookiemonster
Messages: 13963 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 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
![](/forum/images/custom_avatars/102589.gif) |
Michel Cadot
Messages: 68733 Registered: March 2007 Location: Saint-Maur, France, https...
|
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
|
|
|