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

Let the user decide which parameter to use. 1

Status
Not open for further replies.

ramc2000

Technical User
Nov 8, 2002
60
GT
Hi... How can I let my users decide which parameter field to use when they run a report?

On my report, I have a list of orders that have been shipped out of our warehouse. I want my users to decide how to filter out data, either by a specific order number or by a certain date time range. (I'm using Crystal XI.)

Initially I thought that if I just leave blank one of the two parameter fields, then the report would filter only by the other parameter but that is not the case. For example, if I leave blank the order parameter, no records are returned.
 
Hi,
What is your record selection formula?
How that handles the parameter values will determine what data is returned, especially how it handles a missing parameter value.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
That would be:

{ORD_NUM} = {?Order} and
{SHIP.DATE} = {?DateRange}
 
Hi,
Then handle the possibllity of no values.
Set a default 'flag' value for each, like
'NOORDER' and 1/1/1900 to 1/2/1900 then test for those:
Code:
If {?Order} = 'NOORDER' then
True
Else
 {ORD_NUM} = {?Order}
AND
If {?DateRange} = Date('1/1/1900') to Date('1/2/1900') then
True
Else
{SHIP.DATE} = {?DateRange}

Not sure about the default date range, but this should give you an idea how to proceed.



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top