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

how do I create multiple parameters?? 3

Status
Not open for further replies.

maggielady

Technical User
Jan 3, 2003
60
US
I finally got my daterange parameter to work!! But I just found out that I need to be able to access the report by daterange and by lastname+firstname. How do I get another parameter in the report so when they run the report it will ask what daterange do you want and whose info do you want to see? Thanks again in advance!!
 
edit the date parameter and select Range Value, rather than discrete value.

For the Lastname firstname, just add more parameters.

Reebo
Scotland (Sunny with a Smile)
 
Which version of CR are you using?

Reebo
Scotland (Sunny with a Smile)
 
You don't need additional parmeters, just reference them in the record selection formula, as in:

(
{table.date} = {?MyDateParm}
)
and
(
{table.last} = {?MylastParm}
)
and
(
{table.first} = {?MyFirstParm}
)

Check the Database->Show SQL Query to assure that the SQL is being passed to the database (providing you're using a database that supports SQL).

-k
 
I already have the daterange parameter as a Range Value, and I have that parameter in the report header, supressed. where would I put another parameter to ask the second ? of who do you want the info for?
 
If you put in the record selection formula that SV provided you with, it should ask you for the first and last parameters.

ps. SV congrats on being Top Tipmeister, I said you weren't past it!

Reebo
Scotland (Sunny with a Smile)
 
Creat a new paramter field, the same way you created the date range parameter, just make it a discreet value and a string data type.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
In the record selection I have the numbertodate formula from yesterday. I just add this other formula to this? So the formula would be:
numbertodate(todate(table.date)) in {?daterange};
({table.date}={?daterange})
and
({table.last}={?mylastparm})
and
({table.first}={?myfirstparm})
 
numbertodate(todate(table.date)) in {?daterange}
and
({table.last}={?mylastparm})
and
({table.first}={?myfirstparm})

Reebo
Scotland (Sunny with a Smile)
 
I think this:
NumberToDate(ToDate(table.date))

Should read:
NumberToDate(ToNumber(table.date))

I seem to remember that your date is a string in a YYYYMMDD format.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
Yes, I did post that incorrectly. I do have it the correct way on the report. Thanks!!
 
One more problem, I need to be able to ask by date range and/or by person. The way it is now, I have to answer each parameter ?. If I try to run the report just by a date range and not put in a person's last and first name, I get nothing? Thanks again and hopefully I won't bother you guys again today!!
 
(if {?mylastparm} <> &quot;&quot; then {table.last}={?mylastparm} else true)
and
(if {?mylastparm} <> &quot;&quot; then {table.first}={?myfirstparm} else true)

Reebo
Scotland (Sunny with a Smile)
 
Sorry,

(if {?mylastparm} <> &quot;&quot; then {table.last}={?mylastparm} else true)
and
(if {?myfirstparm} <> &quot;&quot; then {table.first}={?myfirstparm} else true)


Reebo
Scotland (Sunny with a Smile)
 
one last thing, if I run the report for a date range i need the date range printed below the report title like so:

Report Title
Date range report was run for
 
You need ot create a formula for the date range, and place it in the page header:

&quot;Report for &quot;&minumim({?DateRangeParm})&&quot; to &quot;&maximum({?DateRangeParm})

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
dgilsdorf@trianglepartners.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top