My report extracted based on parameters. There are about 12 parameters. Few of the parameters will be initially set to default values in parameter section like 'ALL'.
ALL - means no filter on that field, problem here is the field is null in the DB. How to handle this is Record Selection section validation.
With the following code in between other validation the query is returing no rows.
(
If {param-1} = 'ALL' then
{report.field-1} like '*'
else
{report.field-1 = {?param-1}
)
and
(
If {param-2} = 'ALL' then
{report.field-2} LIKE '*'
else
{report.field-2} = {?param-2}
)
and
(
If .......
.....
...
(
if {param-5} = 'ALL' then
{report.field-5} LIKE '*'
else
{report.field-5} = {param-5}
)
In this conditon if database is having null values though ALL is set as defalut value in parameter creation part this is fetching any records.
When i query database with IS NULL it retrieves data. Its confirmed that it is null. I need to enforce in the query in crystal to retieve all the records. It is string data type.
It is null now, will have data later.
How to handle this scenario.
Four conditions before this condition are working properly and 2 below this are working fine. Because of this having null values in DB the entire report returns no records.
There are 2 more fields which have null values in DB.
How to retieve data though few parameters have null data in DB and are set to default like ALL in parameters to retrieve data.
Thanks.
ALL - means no filter on that field, problem here is the field is null in the DB. How to handle this is Record Selection section validation.
With the following code in between other validation the query is returing no rows.
(
If {param-1} = 'ALL' then
{report.field-1} like '*'
else
{report.field-1 = {?param-1}
)
and
(
If {param-2} = 'ALL' then
{report.field-2} LIKE '*'
else
{report.field-2} = {?param-2}
)
and
(
If .......
.....
...
(
if {param-5} = 'ALL' then
{report.field-5} LIKE '*'
else
{report.field-5} = {param-5}
)
In this conditon if database is having null values though ALL is set as defalut value in parameter creation part this is fetching any records.
When i query database with IS NULL it retrieves data. Its confirmed that it is null. I need to enforce in the query in crystal to retieve all the records. It is string data type.
It is null now, will have data later.
How to handle this scenario.
Four conditions before this condition are working properly and 2 below this are working fine. Because of this having null values in DB the entire report returns no records.
There are 2 more fields which have null values in DB.
How to retieve data though few parameters have null data in DB and are set to default like ALL in parameters to retrieve data.
Thanks.