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

Hardcoding parameter in Crystal

Status
Not open for further replies.
Mar 20, 2009
102
US
I am calling a stored procedure in Crystal and I have 2 parameters: @candidateid and @typeid.

I am setting @typed = -1 or typeid = @typeid in the code. I want to hardcode @typeid = 2 in Crystal so the user won't have to enter it when running the report. Currently I have @typeid = 2 in the Selection Formula-->Record. It is still asking for @typeid when launching the report. How can I set the value to 2 and not have the parameter show when running report.

Thanks,
 
Hi,
If @typeid is referenced ( even in a selection formula), CR will prompt for a new value..Can you code it in the SP instead of in the report?



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
You would have to change the SP. The only way to feed parameter values into Crystal, other than user interaction, is using your own application or a 3rd-party viewer.

I take that back. I guess another "creative" option is to place the report as subreport and feed the parameter value as a link from the dummy main report... :)

- Ido

view, email, export, burst, distribute, and schedule Crystal Reports.
 
You could put your "parameter" in an Excel spreadsheet, and link this to your tables. In this way any of your users with permission can edit the parameter, rather than hard coding it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top