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

How to prompt for a value

Status
Not open for further replies.

kuberacupidagra

Programmer
Oct 21, 2005
36
US
Hello All,

Is there a way in Crystal Reports to prompt user to input a value(suppose for the month of a year)and then use that value to select records.

Thanks,

AA
 
Sure, it's called a parameter, and you then reference them in the Report->Edit Selection Formula->Record to pass the filter request on to the database, and to get the report to prompt for the value.

If you right click parameters in the Field Explorer and select New, you can define it's type, and then match it to the database type.

To use a month, you can either use a date type parameter and select range, or you can create 2 prompts, one for the month, and one for the year, and then reference them accordingly in your record selection formula.

Examples:

Date range record selection formula:

{table.date} in {?MyDateRangeFormula}

Month year example:

(
month({table.date}) = {?MyMonthParameter}
and
year({table.date}) = {?MyYearParameter}
)

You might also check out my FAQ for more advanced information:

faq767-3825

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top