reporting-servicesreportbuilder3.0

Lookupset in Brackets


The function:

=join(      
    lookupset(
        Fields!ID.Value,
        Fields!ID.Value,
        Fields!Name.Value, "DATASET"
        ),
    Environment.NewLine
    )

This works fine. Now I want to add brackets before and after the value, so I tried this:

=join(      
    lookupset(
        Fields!ID.Value,
        Fields!ID.Value,
        & " (" & Fields!Name.Value & ")", "DATASET"
        ),
    Environment.NewLine
    )

The after-part & ")" works fine, but the before-part & " (" & is causing an error ([BC30201] Expression expected.) Is there a way to solve the problem inside the lookupset function?


Solution

  • The return value starts with a concatenation character & so is an invalid expression.

    Try using:

    =join(      
        lookupset(
            Fields!ID.Value,
            Fields!ID.Value,
            " (" & Fields!Name.Value & ")", "DATASET"
            ),
        Environment.NewLine
        )