Reputation: 63
I have an SSRS report that is connecting to a JDE data source. In the dataset for my query I am trying to concatanate three columns. I tried the concat function, I tried two bars, I tried the plus sign, everything fails. for example: concat(col1, col2, col3) as "keylookup" col1 || col2 || col3 as "keylookup" col1 + col2 + col3 as "keylookup"
Is there a way that works for both SSRS and JDE?
Also is there a cast functiob or equivalent for JDE that SSRS supports?
Thanks
Upvotes: 0
Views: 47
Reputation: 10880
Not sure why you are not able to concatenate within the query but when all else fails, you can use a Calculated field in your dataset to let SSRS concatenate the fields.
Create a Keylookup field with a value expression of:
=Fields!col1.Value & Fields!col2.Value & Fields!col3.Value
If your fields are not strings, convert them with CStr.
=CStr(Fields!col1.Value) & CStr(Fields!col2.Value) & CStr(Fields!col3.Value)
If your fields can have nulls, you may need to change them to blanks:
=CStr(IIF(ISNOTHING(Fields!col1.Value), "", Fields!col1.Value) &
CStr(IIF(ISNOTHING(Fields!col2.Value), "", Fields!col2.Value) &
CStr(IIF(ISNOTHING(Fields!col3.Value), "", Fields!col3.Value)
Upvotes: 0