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!

Ignoring report selection parameters when Null - CR XI

Status
Not open for further replies.

jeffr1

IS-IT--Management
Oct 16, 2005
9
AU
I have <include> & <exclude> report selection parameters:

.. and <Include_text_variable> in <field> and
not <Exclude_text_variable> in <field>

but want them ignored so that all records are returned with respect to these parameters if they are left blank at run-time.

I have tried using:

<other conditions not listed here)
And

// If {?Desc_Filter Include} in either field or filter not entered at run time, print record

If Not Isnull ({?Desc_Filter Include})
then
({?Desc_Filter Include} in ({File.JNLDTLDESC}) or

{?Desc_Filter Include} in {File.JNLDTLREF})

//Exclude Filter
// If ({?Desc_Filter Exclude}) in either field, don't print or excl_filter not entered at run time, print records subject to other conditions

and

If Not Isnull ({?Desc_Filter Exclude})
then
(
Not ({?Desc_Filter Exclude} in {File.JNLDTLDESC}) or
Not ({?Desc_Filter Exclude} in {File.JNLDTLREF})

without success.

What's the best way to ignore record selection conditions when parameters are blank on run time screen?

 
My apologies for my auggestion to move this thread in the other forum--I see you posted here two days ago when asked to move your thread from the wrong forum.

In CR XI, something must be selected for each parameter, so the usual way of handling this is to add "All" to the picklist or direct the user to enter "All" in the prompt text:

(
(
{?Prompt} <> "All" and
{table.field} = {?Prompt}
) or
{?Prompt} = "All"
)

I'm not sure why you are using the syntax you show in your sample. If you want to search for a certain value in a field, then I would use:

(
(
{?Prompt} <> "All" and
{table.field} like "*"+{?Prompt}+"*"
) or
{?Prompt} = "All"
)

-LB
 
Great, thank you. I'll give it a go
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top