cancel
Showing results for 
Search instead for 
Did you mean: 

Can we use 'Insert' and 'Update' statements in the Stored Procedure of CR?

Former Member
0 Kudos

Hi All,

I created a stored procedure and using that as a source for the crystal report.

And would like use the 'Insert' and 'Update' statements in the stored procedure which is made as a source to Crystal reports. Please let me know whether we can use 'Insert' and 'Update' statements in the stored procedure which is a source to the Crystal reports. If yes, please advise the restrictions or rules to be followed.

Your answer would be a great help.

Thanks in advance.

regards,

sriram

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sriram,

Storedprocedure is a database property, we will create a CR based on StoredProcedure. You can use all valid SQL statements.

Thanks,

Sastry

Answers (2)

Answers (2)

Former Member
0 Kudos

Yes ...It is possible.

Former Member
0 Kudos

Hi Sriram,

Yes you can use Insert/Update statement with in a stored procedure but the end statement should be a select statement.

For ex:

Create procedure sp as

--- Insert into tmptable.

- Update statement '--if any.

--- Select from tmptable;

Hope this helps!!!!

Regards,

Vinay

Former Member
0 Kudos

I believe you can, but be careful! Refreshing the report will call the SP again, and do another round of inserts/updates.

You'll have to ensure that whatever account is connecting from Crystal to the SP has sufficent rights to call the SP and/or update the tables.