Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ssrs rdl text box expression concatenation string and field

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.

like image 869
mbcharney Avatar asked Oct 18 '17 14:10

mbcharney


People also ask

How do I use IIF in SSRS expression?

Using IIF Function in SSRS We are going to add a new field to the report data set to determine if the Order Year is the Max or Current Year. As shown below, the dataset properties window is opened, and the Fields tab is selected. After clicking Add, at the bottom of the list a new field is added.

How do you set expressions in SSRS report?

In Design view, click the text box on the design surface to which you want to add an expression. For a simple expression, type the display text for the expression in the text box. For example, for the dataset field Sales, type [Sales] . For a complex expression, right-click the text box, and select Expression.


1 Answers

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

like image 124
NewGuy Avatar answered Sep 20 '22 16:09

NewGuy