Enables you to select stored procedures to obtain results.
The optional index parameter specifies the nth position in the stored procedure argument list (with the first parameter being indexed at 1). If no index value is provided, the assumed order is the order in which they are defined (again, beginning at 1). If there is a mix of some method calls with the index value and some without, the order are those with indexes first followed by definition order of those without indexes.
This method is used with the ProcessStoredProc (Method).
Expression.SetStoredProcParm(Parameter As Value, [Optional]ParamIndex As Number)
This example shows how to open and process a stored procedure in the Query section:
ActiveDocument.Sections["Query"].SetStoredProcParam("Param1",1); ActiveDocument.Sections["Query"].SetStoredProcParam("Param2",2); ActiveDocument.Sections["Query"].ProcessStoredProc();
This example shows how to call a stored procedure. It assumes you have inserted a Query section and added the procedure.
ActiveDocument.Sections["Query"].ProcessStoredProc()
This example shows how to pass a single parameter from a Dashboards object. It proceeds the ProcessStoredProc method. The value of 1 in this example matches the position in the argument:
ActiveDocument.Sections["Query"].SetStoredProcParam(txtBeginDate.Text,1);