ssrs rdl text box expression concatenation string and field

mbcharney picture mbcharney · Oct 18, 2017 · Viewed 25.1k times · Source

I have several ssrs rdl reports where I am trying to concatenate text then a data set field then text again and it is displayed as a bar code.

Here is the expression:

="*" & Fields!barcodenum.Value & "*"

Example data for 200145 would look like:

enter image description here

The report was built with BI in VS 2015. The data set returns the correct data as verified by the query designer.

When I run the report from the 'preview' in VS it displays the correct information for the bar code field.

When the report is published to the SSRS server, 2008R2, it only displays the two stars and no field data.

enter image description here

The field is formatted as a varchar(8).

Am I concatenating the field correctly? Is there a different way to concatenate this?

Any help would be very greatly excepted.

Answer

NewGuy picture NewGuy · Oct 18, 2017

Try ="*" & CSTR(Fields!barcodenum.Value) & "*" Your barcodenum field is probably an INT and needs to be converted to a string for this to work.