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

Including null values in parameter fields 1

Status
Not open for further replies.

maddyyikes

IS-IT--Management
Jul 19, 2004
32
0
0
US
Using: Crystal Reports 8.5
P4 Database (proprietary)
ODBC driver

I have a field called "SubCategory" in the database. It has the following values:

Mainframe
Security
Network Infrastructure
Hardware
Desktop Software
....and so on(about 50 values)

I have the following requirement:

Sometimes I need to see the records pertaining to all the subcategories while at other times I need to see the records of all subcategories except one of them (say Mainframe) How can this be achieved using the parameter field, as I want the user to make a choice for the same, at runtime? I do not want to specify all the values (in the "SubCategory" field) as default values in a parameter field and then select a subset of them, as I feel that there is a more efficient way of achieving the same. Plz help!! Thanx in advance!!!

Note: The "SubCategory" field has been concatenated with the "Category" and "Problem Type" fields and is represented as "Category-SubCategory-ProblemType" field in the report.
 
You could have a parameter that defines the run mode.

if {@runmode} = 'I' then include all else
if {@runmode} = 'E' then exclude only the selected
subcategories
 
Hi ,
Thanx a lot! ...but could u plz explain to me more specifically as to how I can exclude a few subcategories and select the others? Thanx in advance!
 
if {?runmode} = 'I' and {@subcategory} = {?subcategory}
then true else
if {?runmode} = 'E' and {@subcategory} not = {?subcategory}

where {@subcategory} is the field name in the database
and {?subcategory} is the parameter for subcategory
and {?runmode} is the parameter for the run mode
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top