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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter with Null Values 1

Status
Not open for further replies.

goduke

IS-IT--Management
Feb 13, 2006
65
US
Guys, I will do my best to explain my problem. I am using Crystal 11.5 and MS SQL Database.

I have a report that I am wanting to use three different parameters to filter the data. I have all three set up correctly, but I have one issue with one parameter for a field called Tenant. What I want to do is prompt the user to select a Tenant when they run the report, however, I have some records that have a Null Tenant. Inside my parameter I am appending all values from the database to list the different Tenants, but I need to be able to add a value of my own so that when they select that value, they will get the null Tenants. I added a value called PUBLIC (No Tenant). Then in my select critiera I did:

(if {?Tenant} = "PUBLIC (No Tenant)" then isnull({ca_tenant.name}) else
{ca_tenant.name} = {?Tenant})

I works when I either select PUBLIC (No Tenant) or when I select one/multiple tenants not including PUBLIC (No Tenant). I need to be able to select multiple Tenants in my parameter including the PUBLIC (No Tenant). Is that possible? Thanks guys.

Clint
 
Try creating a formula called Tenant:

if isnull({ca_tenant_name}) then "PUBLIC (No Tenant)"
else {ca_tenant_name}.

then your selection formula can be:

{@Tenant} = {?Tenant}

 
WOW - that worked perfect!

Thanks so much for the help briangriffin!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top