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

CR 7.0: Generate Report with User Input 1

Status
Not open for further replies.

MsPepperMintUSA

Programmer
Mar 15, 2001
52
US
Quick question:
How do I prompt the user to enter a code to send as a parameter to query the database which generates the report within the Crystal Report environment?
 
In the web/vb environment, I would use a message box to capture the field and send to a stored procedure.

I do not know how to handle this functionality in the Crystal Report environment. What is equivalent to a message box in Crystal Report? How does one call a stored procedure in the CR environment.

 
You create a parameter in Crystal. Then you would probably use the parameter in the Record Selection of the report. When the report runs, Crystal will prompt for the value of the parameter.

If you launch the report from VB or ASP, you can get the value for the parameter there, then pass it to the report. Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / ASP / Crystal / SQLServer
 
Unfortunately, my front end is Crystal Reports and backend is sybase. The report will be launched from Archibus, it will call the .rpt directly. If I can have functionality work in the Crystal Report environment, it will work when called from Archibus.

I have created a parameter field in the report, but it returns all the records, not my specific record. Any additional suggestions would be greatly appreciated.
 
Then your record selection is probably not working.

If your parameter represents State, and you have created a parameter called p_State, then you need to create a record selection where some database field that represents State = {?p_State}. When you open the Record Selection dialog box, you pick the database field, pick the selection (is equal to) and then pick the value (the first one should be your parameter). Brian J. Alves
Email: brian.alves@worldnet.att.net
VB / ASP / Crystal / SQLServer
 
Thanks, that's exactly what the problem was. It works beautifully now.

Thank you for your time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top