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

Send Parameters into a SQL Statement

Status
Not open for further replies.
May 2, 2002
16
US
Is there a way to send parameters into a sql statement udf inside of crystal reports.



 
Dear Eric,

Please describe what you are trying to do a little more fully.

In the sql expression editor if you have a function (without cursors from my experience) you can call a function, and pass a database field, example:

(dbo.mrfclid(Tab.CL_Full_Name)) will work.

However, if you mean can I pass a Crystal Parameter to a UDF I would say that you would have to base your report on a Stored Procedure.

Any parameters in a stored procedure are automatically created in Crystal, so the user would be prompted, and as long as the result of your stored procedure is a result set - then you should be able to call your function within the procedure.

Hope that helps,
ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
I am trying to pass a run time parameter from a wrapper to the udf inside of the sql expression editor.

dbo.udf(?p_parameter_1,?p_parameter_2)

The udf was to evaluate the parameters and pass back a boolean that I could then filter on.

I am trying to stay away from a stored procedure bcse I have to do this on 16 reports.
 
Dear EricVonSkip,

Cannot be done, as far as I know. Although if you are using the rdc, some in the integrate forum might be able to give you ideas.

However, as to native functionality in Crystal you can only use database fields not Crystal Parameters.

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
rosemary,

We are not using rdc so I am off to write the proceedures.

thanx

eric
 
I Have a Question, for you, I started to work with RDC in crysttal 8.5 with VB 6.0, then I need to send a parameter since visual to cristal 8.5, other question is that i need to do a formula in RDC, how can I do?
 
Dear Ariasf,

You should post this as a new question. I am afraid that I do not work with rdc or VB, I am simply aware of the capabilities.

You should be able to find some information in the Crystal Integrate forum. In addition, Ken Hamady has great info at his site and a vb/crystal manual available for an insignificant price.
ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top