cancel
Showing results for 
Search instead for 
Did you mean: 

Document Composition 16 external data source

Joseph_Onderak1
Champ in-the-making
Champ in-the-making

I am trying to save a query to a placeholder and display it on a template as a barcode. 

Here is the query

select CONCAT('*', RTRIM(rmo.attr1021), REPLICATE('0', 8 - LEN(RTRIM(rmo.attr1031))) + RTRIM(rmo.attr1031), ' ESRDRX ','*') as [RXBarcode]

from

hsi.rmObjectInstance1001 rmo

where rmo.attr1022 = '&EncounterNum'

 

Trying to put this on the template it won't display a barcode.  I am not sure if it does anything.  I don't see any errors in the Diagnostics console and since I am concatenating multiple columns together I have to add the Column Name at the end as [RXBarcode]  I have that as my column name and it really isn't working.

Should I do something like

DECLARE @RXBarcode VARCHAR (50)

SELECT @RXBarcode = CONCAT(…)

then SELECT the variable?  or should I save it to a temp table then select the temp table column?  The query works fine through SSMS.

 

This is for Document Composition v16.

 

2 REPLIES 2

Melissa_Koltisk
Star Contributor
Star Contributor

Good afternoon Joe,

 

Due to the difficulty of determining which variables in your environment might be contributing to this issue, I recommend reaching out to your first line of support for troubleshooting assistance.

Allan_Schon
Star Contributor
Star Contributor

What about removing the barcode portion of this?  Does it display in a text placeholder if you configure it that way?  That would help us understand whether there's a problem with the query or something happening with the barcode.