on 07-20-2010 11:12 AM
Hi All,
I have one issues regarding the parameter in the report.
I have two parameter field in the report. The scenario will be as below:
In my report, i have mobile no & passport no parameter selection. Currently in my report, the selection was like below:
{pax.mobile} = {?mobile} and
{pax.passport} = {?passport}
Formula above was placed in report's select expert. Each time user need to select or enter the two parameter above in order to select the entered data to be reflected into the report. However, my report REQUIRED to allowed null value from the parameter selection. I can enter mobile no but leave passport null, however with the formula above was unable to proceed to refresh the report. I have the formula as below, however it could not be able to work.
(if(hasValue({?mobile}) = true) then {pax.mobile} = '*ALL'
else {pax.mobile} = {?mobile} ) and
(if(hasValue({?patssport}) = true) then {pax.passport} = '*ALL'
else {pax.passport} = {?passport} )
The formula above will display all of the records and sometimes it will b hung.
Appreciated anyone who knows this able to advice.
Thanks.
Regards,
CK
I would have thought that if the parameter was Null then hasvalue() would return false
Try
(if(hasValue({?mobile}) = false) then true
else {pax.mobile} = {?mobile} ) and
(if(hasValue({?patssport}) = false) then true
else {pax.passport} = {?passport} )
Ian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Thanks for your feedback.
I have try one of the example below:
if(hasValue({?Country})=false) then true
else {Customer.Country} like '*'&{?Country}
If country parameter is null, it will retrun all country. But i would like to return Country = 'USA' if my parameter value is null.
Is this possible to do it in the formula above? I tried something like below, but if has parameter value it will return the USA as well.
if(hasValue({?Country})=false) then {Customer.Country} = "USA"
else {Customer.Country} like '*'&{?Country}
I am having this same issue, but my parameter field is a date field.
If the date parameter field is null then i would like to see all of the information, but if it has a date entered in the parameter field then i would like to see everything from that date on.
Below is the formula that i have created.
if(hasValue({?Start Date})=false) then true
else {archsrsysclasstbl.START_DT} >= {?Start Date}
When I execute the report and not enter a value for the date parameter the report will not execute because it is waiting for a value.
How do i get it to select everything if the parameter is null.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.