Skip to Content
author's profile photo Former Member
Former Member

Help show multiple values in parameter and blank values

I created a basic report in Crystal Reports XI using a SQL view. I have a parameter for County. When a user selects "All" counties, I want it to include the blank counties also. Most rows do not have a county entered. Below is what I have in the Select Expert but when "All" is selected, it doesn't display the blank County records.

{View_Offense.Repdate}={?Date Range} and

({View_Offense.OFFREPUNIT} = {?District}) and

({View_Offense.OFFREPNAME} = {?Employee}) and

{View_Offense.Status} = {?Offense Status} and

{View_Offense.OFFDESC} = {?Offense Description} and

({View_Offense.County} = {?County} or (" ") = {?County})

The below formula works correctly, but I get the "This array must be subscripted" error the next time I open the Select Expert.

{View_Offense.Repdate}={?Date Range} and

({View_Offense.OFFREPUNIT} = {?District}) and

({View_Offense.OFFREPNAME} = {?Employee}) and

{View_Offense.Status} = {?Offense Status} and

{View_Offense.OFFDESC} = {?Offense Description} and

({View_Offense.County} = {?County} or {View_Offense.County} = " ")

Will someone please help me with this?

Thanks.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Sep 08, 2009 at 02:09 PM

    I figured it out. I created the following formula:

    IsNull({View_Offense.County}) Or

    InStr({View_Offense.County}, " ") = 0 or

    {View_Offense.County} = {?County}

    Set the formula to "IsTrue" in Select Manager:

    {@OffenseDesc} and

    {@County} and

    {@District} and

    {View_Offense.Status} = {?Offense Status} and

    {View_Offense.OFFREPNAME} = {?Employee} and

    {View_Offense.Repdate}={?Date Range}

    I made similar formulas for the OffenseDesc and District fields.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.