Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Include null values in Dynamic parameter selection

Status
Not open for further replies.

GCL2007

IS-IT--Management
Dec 11, 2007
167
US
Using Crystal 11 on Oracle...Have a report where I need to set up dynamic parameter based on a segment within an account number field.
I was going to add the below using Add Command so I could set up a dynamic parameter and add the new command table as a standalone table in my report.
Select SUBSTR(num,10,2) from account
My problem is I will I have a number of records that will not have an account number, but I still want to report them. What would be the best way to accomodate this? Ideally I would like null to appear in the parameter selection along with the other entries from the Command table.
Any thoughts?

Thanks
 
Change your command to:

Select SUBSTR(num,10,2)
from table
union
select 'Null'
from table

Then use a record selection formula like this:

(
(
{?num} = "Null" and
isnull({table.num})
) or
mid({table.num},10,2) = {?num}
)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top