Bennie47250
Programmer
Using Crystal 7
I have always told anyone that asked that I have not found anything Crystal can’t do; well I think I have finally done it.
In a table we have a field name “TypeOfInspection” and it that field will ether be an F or S. I have been asked to develop a report that will prompt the user to enter an F to get just the F records or enter an S to get just the S records or enter an B to get both types of records.
I thought I could do this by creating a Parameter that prompts for the F, S or B and then have a formula that passes the value to the field in the select expert. I have been able to get this to work to pass ether an F or an S but I can’t get the both to work.
The formula that passes the value is
if {?RecordTypeForInspection} = 'S' then "S"
else if {?RecordTypeForInspection} = 'F' then "F"
else if {?RecordTypeForInspection} = 'B' then "F","S"
In the record selection the selection formula is
{@Year} = {@CurrentYear} and
{Inspection_and_Receipt_Records.TypeOfInspection} in ["{@RecordSelection}"] and
{Inspection_and_Receipt_Records.VNDNO} = 3202.00
(I’m using the IN operator to allow me to use “F","S" when B is selected.)
Any thoughts on how I can do what I’m attempting to do using my method or another?
Thanks
Bennie
I have always told anyone that asked that I have not found anything Crystal can’t do; well I think I have finally done it.
In a table we have a field name “TypeOfInspection” and it that field will ether be an F or S. I have been asked to develop a report that will prompt the user to enter an F to get just the F records or enter an S to get just the S records or enter an B to get both types of records.
I thought I could do this by creating a Parameter that prompts for the F, S or B and then have a formula that passes the value to the field in the select expert. I have been able to get this to work to pass ether an F or an S but I can’t get the both to work.
The formula that passes the value is
if {?RecordTypeForInspection} = 'S' then "S"
else if {?RecordTypeForInspection} = 'F' then "F"
else if {?RecordTypeForInspection} = 'B' then "F","S"
In the record selection the selection formula is
{@Year} = {@CurrentYear} and
{Inspection_and_Receipt_Records.TypeOfInspection} in ["{@RecordSelection}"] and
{Inspection_and_Receipt_Records.VNDNO} = 3202.00
(I’m using the IN operator to allow me to use “F","S" when B is selected.)
Any thoughts on how I can do what I’m attempting to do using my method or another?
Thanks
Bennie