HELP: Can't Pass Parameters w/Stored Procedure as Data Connection




I'm working on using an existing employment application in PDF format, and I want the form fields to be prepopulated with the user's specific data.

I'd like is so that when a user clicks a link (like www.mysite.com/empapp/empapp.pdf?UserID=5), a dynamic PDF document will open up and that user's data will be populated inside of the form fields by using that user's "UserID" variable/parameter that was passed in the querystring.

I've tried a stored procedure that contains the following select statement:

SELECT * FROM tblEmpApp WHERE UserID = @UserID

I've also tried entering this select statement manually into the box instead of using a stored procedure without success. When I try to use the stored procedure, I receive this error:

Stored procedure "spEmpApp" has non-optional parameters.

How can I set the PDF doc up to populate the form fields based on that passed parameter in the querystring???

******************PLEASE HELP!!!******************





had this same issue.  following works for me.

-create a dataconnection to the db with a random query to the table.

-just clone the dataconnection

     oDConn = xfa.sourceSet.DataConnection.clone(1);

-change the query attribute to the stored procedure

     oDConn.resolveNode("#command").query.select.value = "exec spEmpApp 'parameter'"

-open the cloned data connection