I have created a report that has four dynamic parameters in Crystal XI r1. The list of values is supplied by a SQL Command that also includes the option “All”. I have also created a select formula that will display “All” records when all is selected, or the appropriate data when an item other than all is selected. This works fine if I choose an option other than “All” in all four parameter options. However, If I choose “All” for any of the first three selection options, the report will return all records for the levels below even if I choose specific items at the lower levels, egg
Parameter Value
Team Consultancy
Sector Education
Responsibility John
Type of work Inspection
The above will filter the records to show records for the Team Consultancy, where the Sector is Education, and John is Responsible and where the Type of Work is Inspection.
Parameter Value
Team All
Sector Education
Responsibility John
Type of work Inspection
The above will return all records in the database regardless of the selections made for Sector, Responsibility and Type of Work – This is not the result I am looking for. Although I have selected “All” at Team level, I would like the report to filter by the lower options such as Sector, Responsibility and Type Of Work. I get a similar problem If I choose all at any point, in that all records for the levels below are shown.
My record selection formula is:-
(If {?Super Team} = '..All' then true
else if {?Sector} = '..All' then
{CST_COSTHEADER.CH_SORT} = {?Super Team}
Else If {?Responsibility} = "..ALL" Then
{CST_COSTHEADER.CH_SORT} = {?Super Team} and
{CST_COSTHEADER.CH_USER1} = {?Sector}
else if {?Type of Work} = '..All' then
{CST_COSTHEADER.CH_SORT} = {?Super Team} and
{CST_COSTHEADER.CH_USER1} = {?Sector}and
{CST_COSTHEADER.CH_USER2} = {?Responsibility}
else
{CST_COSTHEADER.CH_SORT} = {?Super Team} and
{CST_COSTHEADER.CH_USER1} = {?Sector} and
{CST_COSTHEADER.CH_USER2} = {?Responsibility} and
{CST_COSTHEADER.CH_USER3} = {?Type of Work})
Any advise gratefully received. Thank You.
Parameter Value
Team Consultancy
Sector Education
Responsibility John
Type of work Inspection
The above will filter the records to show records for the Team Consultancy, where the Sector is Education, and John is Responsible and where the Type of Work is Inspection.
Parameter Value
Team All
Sector Education
Responsibility John
Type of work Inspection
The above will return all records in the database regardless of the selections made for Sector, Responsibility and Type of Work – This is not the result I am looking for. Although I have selected “All” at Team level, I would like the report to filter by the lower options such as Sector, Responsibility and Type Of Work. I get a similar problem If I choose all at any point, in that all records for the levels below are shown.
My record selection formula is:-
(If {?Super Team} = '..All' then true
else if {?Sector} = '..All' then
{CST_COSTHEADER.CH_SORT} = {?Super Team}
Else If {?Responsibility} = "..ALL" Then
{CST_COSTHEADER.CH_SORT} = {?Super Team} and
{CST_COSTHEADER.CH_USER1} = {?Sector}
else if {?Type of Work} = '..All' then
{CST_COSTHEADER.CH_SORT} = {?Super Team} and
{CST_COSTHEADER.CH_USER1} = {?Sector}and
{CST_COSTHEADER.CH_USER2} = {?Responsibility}
else
{CST_COSTHEADER.CH_SORT} = {?Super Team} and
{CST_COSTHEADER.CH_USER1} = {?Sector} and
{CST_COSTHEADER.CH_USER2} = {?Responsibility} and
{CST_COSTHEADER.CH_USER3} = {?Type of Work})
Any advise gratefully received. Thank You.