I know the we can use custom code in SSRS and I know you have actions on Textbox items in a SSRS report.
Is it possible to "combine" this functionality for the following, which I appreciate is quite out the normal use of SSRS
I wish to produce a list of outstanding requisitions for purchase orders from the SQL tables of our ERP system. In the report against each item would be a Text box with the word "Approve" in The idea is for the requisitions the user wishes to approve they would click on the "Approve" and then use the custom code would fire a SQL procedure, passing in the id of the requisition to the procedure. This procedure would interact with the ERP system to do the approval.
Is this possible?
Some pseudo code for the SSRS report code
Imports System.data.sqlclient Dim connectionString AS String = "Server=XXXXXXX;Database=db1234;User Id=user_name;Password=my_password" Dim Command As New SQLCommand("[CHC_AppBuilder].[Testssrscall]", connectionString) Command.CommandType = CommandType.StoredProcedure Command.ExecuteNonQuery()
The SQL procedure
[CHC_AppBuilder].[Testssrscall] just currently executes dbmail to myself
Problems so far:
Location of the
System.data.sqlclient.dllto add the references as per you would in visual studio, so far not been able to test the code.
Trigger the Stored procedure per item.