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

Stored Procedures!

Status
Not open for further replies.

andreako

Programmer
Jun 14, 2001
27
0
0
NO
Hello!

Have I understood i right when I say that in CR8 a stored procedure(sp) MUST return a resultset? If it is so, is there a way that one can avoid this?

You see I have a report in CR7 that calls a sp that generates some temporary tables, but the sp doesn't return anything. In CR8 I can't get this report function properly.

Does a report in CR8 which uses sp's have to use the 'IN OUT CURSOR' as an parameter or can this be avoided? If it can't be avoided what can I do to prevent this parameter to be visible for the user who want to view this report?

Does anybody understand what I am trying to do here?

In short terms: I would like to write a report in CR8, or preferably use the one I have in CR7, that calls a sp but that sp doesn't return anything.

andreako!
 
why use crystal to run the sp? I'm no expert but I would use something else to run it if it's not returning anything.

BRP
"if I had experience I would forget it"
 
Hi!

The sp is based upon some of the parameters the user provides when he\she runs the report. I therefore have to run the sp in the report, or else I won't know how to generate the temp tables that I mentioned before.

andreako!
 
You have to return a resultset. What else is Crystal going to report on?

If you're using Oracle, you need to create a reference cursor and end the stored procedure with:

OPEN ref_cursor
FOR SELECT ...

People tend to do this with packages. They create a package which defines the reference cursor as returning a record type, then define a parameter to the stored procedure that is IN OUT of type <ref cursor package>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top