cancel
Showing results for 
Search instead for 
Did you mean: 

External data source, not filling in placeholders.

Rob_Dale
Star Contributor
Star Contributor

I finally debugged through setting up an external data source.  I was able to setup the ODBC connection that Doc Comp wanted, now, when I test composition, I receive no errors in the diagnostic console.  However, none of placeholders are filled in.  I setup my SQL call, in Doc Comp as:

exec dbo.MailMerge_ContractInfo @ContractNumber = 'XXXXXXXXXXX'

Where X was a hardcoded contract number (just to test it out).

I have a First Name placeholder set up to return data from the above proc, from the Column name OwnerFirstName, but it's not filling in.

What's the best way to debug this, and find out what's going on?  Is there a way to test the Doc Comp query to see that it's returning data?

Thank you.

1 ACCEPTED ANSWER

Can_Ergin
SME
SME

Hi Rob,

It looks like you are using stored procedures. There is currently no support for executing stored procedures as an ODBC query in Document Composition. However, you should be able to get the results you need using a Select statement in the SQL query box in Control Panel | Queries tab | <your query>. The Diagnostic Console is the best way to see any errors that may have occurred during composition. 

Please contact your first line of support to get a support issue created regarding this matter.

Thank you,

Can Ergin

View answer in original post

2 REPLIES 2

Can_Ergin
SME
SME

Hi Rob,

It looks like you are using stored procedures. There is currently no support for executing stored procedures as an ODBC query in Document Composition. However, you should be able to get the results you need using a Select statement in the SQL query box in Control Panel | Queries tab | <your query>. The Diagnostic Console is the best way to see any errors that may have occurred during composition. 

Please contact your first line of support to get a support issue created regarding this matter.

Thank you,

Can Ergin

Dan_Wentworth
Confirmed Champ
Confirmed Champ

Did you try using a 'Scalar User Defined Function'  rather than a Stored procedure?

A scalar UDF returns a single value rather than assigning it to a Variable.

I would unit test the function in SSMS.

Dan